Skip to content

Commit 05a2aad

Browse files
committed
cors middleware update
add Content-Type and User-Agent to Access-Control-Allow-Headers this change is helping cors issue from latest browsers
1 parent b2fbfb6 commit 05a2aad

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/middleware/cors.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ function cors() {
2222
res.setHeader(
2323
'Access-Control-Allow-Methods',
2424
'GET,HEAD,PUT,PATCH,POST,DELETE');
25-
res.setHeader('Access-Control-Allow-Headers', 'Authorization');
25+
res.setHeader(
26+
'Access-Control-Allow-Headers', 'Authorization,Content-Type,User-Agent');
2627

2728
if (req.method === 'OPTIONS') {
2829
res.setStatus(200);

0 commit comments

Comments
 (0)