Fix jwt-token

This commit is contained in:
2025-08-19 04:01:12 +02:00
parent 69bec0f122
commit 3c91415525

View File

@@ -19,7 +19,11 @@ const app = express();
const server = createServer(app); const server = createServer(app);
const io = new Server(server, { const io = new Server(server, {
cors: { 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"] methods: ["GET", "POST", "PUT", "DELETE"]
} }
}); });
@@ -40,7 +44,11 @@ app.use(helmet());
app.use(compression()); app.use(compression());
app.use(morgan('combined')); app.use(morgan('combined'));
app.use(cors({ 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 credentials: true
})); }));
app.use(express.json({ limit: '10mb' })); app.use(express.json({ limit: '10mb' }));