diff --git a/server/app.js b/server/app.js index 4ee54a3..edeaebc 100644 --- a/server/app.js +++ b/server/app.js @@ -50,7 +50,7 @@ function createApp({ skipRateLimits = false } = {}) { baseUri: ["'self'"], frameAncestors: ["'none'"], formAction: ["'self'"], - upgradeInsecureRequests: process.env.NODE_ENV === 'production' ? [] : null + upgradeInsecureRequests: process.env.TRUST_PROXY ? [] : null } }, hsts: { maxAge: 31536000, includeSubDomains: true, preload: true }, diff --git a/server/index.js b/server/index.js index f9badcb..b2e9583 100644 --- a/server/index.js +++ b/server/index.js @@ -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: { @@ -214,15 +214,17 @@ app.use(express.static(PUBLIC_DIR, { } })); -// Serve index.html with nonce injected into the