Skip to content

Commit

Permalink
Merge pull request #8 from icefoganalytics/main
Browse files Browse the repository at this point in the history
Fixing CORS
  • Loading branch information
datajohnson authored Mar 6, 2024
2 parents 27c4e29 + 705dee3 commit af5aa86
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions api/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import path from "path"
import helmet from "helmet"
import qs from "qs"

import { FRONTEND_URL } from "@/config"
import { AUTH0_DOMAIN, FRONTEND_URL } from "@/config"
import router from "@/router"

export const app = express()
Expand All @@ -23,7 +23,7 @@ app.use(express.urlencoded({ extended: true })) // for parsing application/x-www
app.use(
helmet.contentSecurityPolicy({
directives: {
"default-src": ["'self'", "https://dev-0tc6bn14.eu.auth0.com"],
"default-src": ["'self'", FRONTEND_URL, AUTH0_DOMAIN],
"base-uri": ["'self'"],
"block-all-mixed-content": [],
"font-src": ["'self'", "https:", "data:"],
Expand All @@ -34,7 +34,7 @@ app.use(
"script-src-attr": ["'none'"],
"style-src": ["'self'", "https:", "'unsafe-inline'"],
"worker-src": ["'self'", "blob:"],
"connect-src": ["'self'", "https://dev-0tc6bn14.eu.auth0.com"],
"connect-src": ["'self'", FRONTEND_URL, AUTH0_DOMAIN],
},
})
)
Expand Down

0 comments on commit af5aa86

Please sign in to comment.