Add CORS policy on the websocket server
This commit is contained in:
parent
76442fddce
commit
9c5e0ab4d9
1 changed files with 6 additions and 1 deletions
|
|
@ -31,5 +31,10 @@ export default async function() {
|
|||
};
|
||||
});
|
||||
|
||||
io.listen(config.server.port);
|
||||
io.listen(config.server.port, {
|
||||
cors: {
|
||||
origin: ["http://localhost:3000"],
|
||||
credentials: true,
|
||||
}
|
||||
});
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue