Skip to content

Commit

Permalink
Make sure CORS is false when originFrontend is not found
Browse files Browse the repository at this point in the history
  • Loading branch information
WhiteHoodHacker authored Jun 18, 2024
1 parent 508cc18 commit a8caffa
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion server/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,14 @@ app.register(helmet, {
}
})

if (config.originFrontend) {
if (config.originFrontend !== null) {
app.register(cors, {
origin: config.originFrontend
})
} else {
app.register(cors, {
origin: false
})
}

uploadProviderInit(app)
Expand Down

0 comments on commit a8caffa

Please sign in to comment.