Skip to content

Commit 1454090

Browse files
fix: disable CSP upgrade-insecure-requests for HTTP deployments
Helmet's default CSP includes upgrade-insecure-requests which forces browsers to use HTTPS even when the page is served over HTTP. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 1cb8ad2 commit 1454090

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

server/src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ if (!configValidation.valid) {
2828
}
2929

3030
// Security middleware
31-
// Disable HSTS as app may run on HTTP in home server environments
31+
// Disable HSTS and CSP as app runs on HTTP in home server environments
3232
app.use(
3333
helmet({
34-
contentSecurityPolicy: config.nodeEnv === 'production' ? undefined : false,
34+
contentSecurityPolicy: false,
3535
hsts: false,
3636
})
3737
);

0 commit comments

Comments
 (0)