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: {
|
webserver: {
|
||||||
enabled: boolean;
|
enabled: boolean;
|
||||||
port: number;
|
port: number;
|
||||||
hostname: string;
|
permitted_hosts: string | string[];
|
||||||
};
|
};
|
||||||
game: {
|
game: {
|
||||||
hand_size: number;
|
hand_size: number;
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ export default async (conf: config) => {
|
||||||
|
|
||||||
io.listen(conf.websocket.port, {
|
io.listen(conf.websocket.port, {
|
||||||
cors: {
|
cors: {
|
||||||
origin: conf.webserver.hostname,
|
origin: conf.webserver.permitted_hosts,
|
||||||
credentials: true,
|
credentials: true,
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue