Skip to content

Commit 380b885

Browse files
committed
fix(security): update Content Security Policy to remove unnecessary imgSrc entry and addd comment for styleSrc
1 parent 37acbdc commit 380b885

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

server.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,9 @@ fastify.register(helmet, {
9393
contentSecurityPolicy: {
9494
directives: {
9595
defaultSrc: ["'self'"],
96+
// styleSrc: unsafe-inline is needed for our styling
9697
styleSrc: ["'self'", "'unsafe-inline'"],
97-
imgSrc: ["'self'", 'data:', 'https:'],
98+
imgSrc: ["'self'", 'data:'],
9899
'connect-src': ["'self'", 'sdk.openui5.org', sentryHost, dynatraceOrigin],
99100
'script-src': isLocalDev
100101
? ["'self'", "'unsafe-inline'", "'unsafe-eval'", sentryHost, dynatraceOrigin]

0 commit comments

Comments
 (0)