Fix jwt-token
This commit is contained in:
@@ -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' }));
|
||||||
|
|||||||
Reference in New Issue
Block a user