mirror of
https://github.com/AustinKelsay/plebdevs.git
synced 2025-06-06 18:31:00 +00:00
Update cors middleware
This commit is contained in:
parent
d3690e5f3d
commit
3451ae3f80
@ -2,8 +2,11 @@ import Cors from 'cors';
|
|||||||
|
|
||||||
// Initialize the cors middleware
|
// Initialize the cors middleware
|
||||||
export const corsMiddleware = Cors({
|
export const corsMiddleware = Cors({
|
||||||
methods: ['GET', 'HEAD', 'POST'],
|
methods: ['GET', 'HEAD', 'POST', 'OPTIONS'],
|
||||||
origin: '*',
|
origin: '*',
|
||||||
|
credentials: true,
|
||||||
|
optionsSuccessStatus: 200,
|
||||||
|
allowedHeaders: ['Content-Type', 'Authorization'],
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user