Skip to content

Commit

Permalink
fix: allow any origin for selfhost (#1397)
Browse files Browse the repository at this point in the history
  • Loading branch information
julianpoy committed Jun 6, 2024
2 parents 54e055f + d6791a5 commit 62b21ad
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/backend/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ const corsWhitelist = [
];
const corsOptions = {
origin: (origin, callback) => {
if (process.env.NODE_ENV === "selfhost") {
// Always allow any origin for selfhost
callback(null, true);
return;
}
const enableCors = origin && corsWhitelist.indexOf(origin) !== -1;
callback(null, enableCors);
},
Expand Down

0 comments on commit 62b21ad

Please sign in to comment.