Skip to content

Commit 83dd5eb

Browse files
committed
fix options call settings
1 parent 054234b commit 83dd5eb

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

server/api/AdminAPI.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ const ADMIN_CORS_OPTIONS = process.env.NODE_ENV?.trim() === 'development'
1616
optionsSuccessStatus: 200
1717
};
1818
router.use(cors(ADMIN_CORS_OPTIONS));
19+
router.options('/games/state', cors(ADMIN_CORS_OPTIONS));
1920

2021
router.post('/sockets/broadcast', (req, res, next) => {
2122
CONTENT_TYPE_VALIDATOR(req, res, next);
@@ -28,8 +29,6 @@ router.post('/sockets/broadcast', function (req, res) {
2829
res.status(201).send('Broadcasted message to all connected sockets: ' + req.body?.message);
2930
});
3031

31-
router.options('/games/state', cors(ADMIN_CORS_OPTIONS));
32-
3332
router.get('/games/state', async (req, res) => {
3433
const gamesArray = [];
3534
const keys = await eventManager.publisher.keys('*');

0 commit comments

Comments
 (0)