Skip to content

Commit

Permalink
Fixing trailing slash in CORS
Browse files Browse the repository at this point in the history
  • Loading branch information
datajohnson committed Dec 18, 2024
1 parent d3a49f7 commit 3a04349
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/api/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ app.use(express.urlencoded({ extended: true })); // for parsing application/x-ww
app.use(
helmet.contentSecurityPolicy({
directives: {
"default-src": ["'self'", `${AUTH0_DOMAIN}`],
"default-src": ["'self'", `${AUTH0_DOMAIN.replace(/\/$/, "")}`],
"base-uri": ["'self'"],
"block-all-mixed-content": [],
"font-src": ["'self'", "https:", "data:"],
Expand All @@ -23,7 +23,7 @@ app.use(
"script-src-attr": ["'none'"],
"style-src": ["'self'", "https:", "'unsafe-inline'"],
"worker-src": ["'self'", "blob:"],
"connect-src": ["'self'", `${AUTH0_DOMAIN}`],
"connect-src": ["'self'", `${AUTH0_DOMAIN.replace(/\/$/, "")}`],
},
})
);
Expand Down

0 comments on commit 3a04349

Please sign in to comment.