From 41cfb533d5179b2aaafe6573972e88c90acbb3f4 Mon Sep 17 00:00:00 2001 From: silverpro89 Date: Wed, 28 Jan 2026 20:34:15 +0700 Subject: [PATCH] update --- app.js | 9 +- controllers/gameController.js | 3 +- public/game-config.html | 659 ++++++++++++++++++++++++++++++++++ 3 files changed, 666 insertions(+), 5 deletions(-) create mode 100644 public/game-config.html 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 @@ + + + + + + + Game Config Manager - Sena AI + + + +
+
+

🎮 Game Config Manager

+

Quản lý cấu hình trò chơi - Sena AI Platform

+
+ +
+
⏳ Đang tải dữ liệu...
+
+
+ + + +