Skip to content

Commit 56640b4

Browse files
committed
fix csp again
1 parent 27a88dc commit 56640b4

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

server/index.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,11 @@ app.use(
9494
crossOriginEmbedderPolicy: false,
9595
contentSecurityPolicy: {
9696
directives: {
97-
'connect-src':
98-
MODE === 'development'
99-
? ['ws:', "'self'"]
100-
: process.env.SENTRY_DSN
101-
? // if using self-hosted or relay server, use that url here
102-
['*.ingest.sentry.io']
103-
: ["'self'"],
97+
'connect-src': [
98+
MODE === 'development' ? 'ws:' : null,
99+
process.env.SENTRY_DSN ? '*.ingest.sentry.io' : null,
100+
'"self"',
101+
].filter(Boolean),
104102
'font-src': ["'self'"],
105103
'frame-src': ["'self'"],
106104
'img-src': ["'self'", 'data:'],

0 commit comments

Comments
 (0)