Skip to content

Commit 686316d

Browse files
committed
hotfix for CORS to expose headers
1 parent 837a811 commit 686316d

1 file changed

Lines changed: 17 additions & 16 deletions

File tree

app.js

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -31,23 +31,24 @@ const corsOptions = {
3131
origin: true, // Allow all origins
3232
credentials: true,
3333
optionsSuccessStatus: 200,
34-
methods : "GET,OPTIONS,HEAD,PUT,PATCH,DELETE,POST",
34+
methods : 'GET,OPTIONS,HEAD,PUT,PATCH,DELETE,POST',
3535
allowedHeaders : [
36-
'Content-Type',
37-
'Content-Length',
38-
'Allow',
39-
'Authorization',
40-
'Location',
41-
'Connection',
42-
'Keep-Alive',
43-
'Date',
44-
'Cache-Control',
45-
'Last-Modified',
46-
'Link',
47-
'Origin',
48-
'Referrer',
49-
'User-Agent'
50-
]
36+
'Content-Type',
37+
'Content-Length',
38+
'Allow',
39+
'Authorization',
40+
'Location',
41+
'Connection',
42+
'Keep-Alive',
43+
'Date',
44+
'Cache-Control',
45+
'Last-Modified',
46+
'Link',
47+
'Origin',
48+
'Referrer',
49+
'User-Agent'
50+
],
51+
exposedHeaders: '*'
5152
}
5253

5354
//Middleware to use

0 commit comments

Comments
 (0)