Commit f552d55 1 parent 42d676a commit f552d55 Copy full SHA for f552d55
File tree 2 files changed +10
-5
lines changed
2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -9,9 +9,18 @@ const rateLimit = require("express-rate-limit")
9
9
10
10
const app = express ( )
11
11
12
+ const corsOptions = {
13
+ headers : [
14
+ { key : "Access-Control-Allow-Credentials" , value : "true" } ,
15
+ { key : "Access-Control-Allow-Origin" , value : "*" } ,
16
+ ] ,
17
+ origin : "*" ,
18
+ optionsSuccessStatus : 200 ,
19
+ }
20
+
12
21
app . use ( morgan ( "common" ) )
13
22
// app.use(helmet());
14
- app . use ( cors ( ) )
23
+ app . use ( cors ( corsOptions ) )
15
24
app . use ( express . json ( ) )
16
25
app . use ( express . static ( path . join ( __dirname + "/../frontend/build" ) ) )
17
26
Original file line number Diff line number Diff line change 11
11
{
12
12
"source" : " /(.*)" ,
13
13
"headers" : [{ "key" : " Access-Control-Allow-Origin" , "value" : " *" }]
14
- },
15
- {
16
- "source" : " /vercel_app_domain_name/(.*)" ,
17
- "headers" : [{ "key" : " Access-Control-Allow-Origin" , "value" : " *" }]
18
14
}
19
15
]
20
16
}
You can’t perform that action at this time.
0 commit comments