fix: correct upgradeInsecureRequests in index.js (the actual production config)
All checks were successful
Build and Push Docker Image / build (push) Successful in 26s
CI / Security audit (push) Successful in 42s
CI / Tests & coverage (push) Successful in 1m5s

The previous fix was applied to server/app.js (the test factory) but
index.js has its own independent Helmet configuration which is what the
production server actually executes. Both files now gate
upgrade-insecure-requests on TRUST_PROXY instead of NODE_ENV.
This commit is contained in:
2026-05-17 09:36:26 +01:00
parent 94fe0dea4d
commit c3ae3a80de

View File

@@ -137,7 +137,7 @@ app.use((req, res, next) => {
baseUri: ["'self'"],
frameAncestors: ["'none'"],
formAction: ["'self'"],
upgradeInsecureRequests: process.env.NODE_ENV === 'production' ? [] : null
upgradeInsecureRequests: process.env.TRUST_PROXY ? [] : null
}
},
hsts: {