Update the config hostname to allow an array of strings for CORS
This commit is contained in:
parent
e42101710e
commit
f92aa28e88
2 changed files with 2 additions and 2 deletions
2
server/src/types/config.d.ts
vendored
2
server/src/types/config.d.ts
vendored
|
|
@ -9,7 +9,7 @@ interface config {
|
|||
webserver: {
|
||||
enabled: boolean;
|
||||
port: number;
|
||||
hostname: string;
|
||||
permitted_hosts: string | string[];
|
||||
};
|
||||
game: {
|
||||
hand_size: number;
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ export default async (conf: config) => {
|
|||
|
||||
io.listen(conf.websocket.port, {
|
||||
cors: {
|
||||
origin: conf.webserver.hostname,
|
||||
origin: conf.webserver.permitted_hosts,
|
||||
credentials: true,
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue