From 3c9141552525fc6b63512a91a87edc3266fa304e Mon Sep 17 00:00:00 2001 From: Alexander Borg Date: Tue, 19 Aug 2025 04:01:12 +0200 Subject: [PATCH] Fix jwt-token --- server/index.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/server/index.js b/server/index.js index 05b6fb8..f148422 100644 --- a/server/index.js +++ b/server/index.js @@ -19,7 +19,11 @@ const app = express(); const server = createServer(app); const io = new Server(server, { cors: { - origin: process.env.CORS_ORIGIN || "http://localhost:3000", + origin: [ + process.env.CORS_ORIGIN || "http://localhost:3000", + "https://selfservice.cqers.com", + "http://localhost:3001" + ], methods: ["GET", "POST", "PUT", "DELETE"] } }); @@ -40,7 +44,11 @@ app.use(helmet()); app.use(compression()); app.use(morgan('combined')); app.use(cors({ - origin: process.env.CORS_ORIGIN || "http://localhost:3000", + origin: [ + process.env.CORS_ORIGIN || "http://localhost:3000", + "https://selfservice.cqers.com", + "http://localhost:3001" + ], credentials: true })); app.use(express.json({ limit: '10mb' }));