diff --git a/app.js b/app.js index 0c23b16..f4d2593 100644 --- a/app.js +++ b/app.js @@ -53,10 +53,11 @@ app.use(helmet({ contentSecurityPolicy: { directives: { defaultSrc: ["'self'"], - scriptSrc: ["'self'", "'unsafe-inline'"], // Allow inline scripts for Swagger UI - styleSrc: ["'self'", "'unsafe-inline'"], // Allow inline styles for Swagger UI - imgSrc: ["'self'", "data:", "https:", "validator.swagger.io"], // Allow Swagger validator - connectSrc: ["'self'"], + scriptSrc: ["'self'", "'unsafe-inline'", "'unsafe-eval'"], // Allow inline scripts + scriptSrcAttr: ["'unsafe-inline'"], // Allow inline event handlers + styleSrc: ["'self'", "'unsafe-inline'"], // Allow inline styles + imgSrc: ["'self'", "data:", "https:", "http:", "validator.swagger.io"], // Allow all images + connectSrc: ["'self'", "http://senaai.tech:10000", "https://senaai.tech"], // Allow API calls fontSrc: ["'self'"], objectSrc: ["'none'"], mediaSrc: ["'self'"], diff --git a/controllers/gameController.js b/controllers/gameController.js index 3aa9196..3bf8875 100644 --- a/controllers/gameController.js +++ b/controllers/gameController.js @@ -72,6 +72,7 @@ class GameController { const cacheKey = `game:${id}`; const cached = await cacheUtils.get(cacheKey); + /* if (cached) { return res.json({ success: true, @@ -79,7 +80,7 @@ class GameController { cached: true, }); } - + */ const game = await Game.findByPk(id); if (!game) { diff --git a/public/game-config.html b/public/game-config.html new file mode 100644 index 0000000..ca4e8e3 --- /dev/null +++ b/public/game-config.html @@ -0,0 +1,659 @@ + + +
+ + + +Quản lý cấu hình trò chơi - Sena AI Platform
+