Update cors middleware

This commit is contained in:
austinkelsay 2024-11-15 13:27:54 -06:00
parent d3690e5f3d
commit 3451ae3f80
No known key found for this signature in database
GPG Key ID: 44CB4EC6D9F2FA02

View File

@ -2,8 +2,11 @@ import Cors from 'cors';
// Initialize the cors middleware
export const corsMiddleware = Cors({
methods: ['GET', 'HEAD', 'POST'],
methods: ['GET', 'HEAD', 'POST', 'OPTIONS'],
origin: '*',
credentials: true,
optionsSuccessStatus: 200,
allowedHeaders: ['Content-Type', 'Authorization'],
});