From 48fa0641185dab560fa0772c1afbcf2fe26f1d94 Mon Sep 17 00:00:00 2001 From: Vesa Luusua Date: Thu, 5 Oct 2017 13:00:57 +0300 Subject: [PATCH] Remove ENFORCE_SSL --- server/index.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/server/index.js b/server/index.js index 435097e8..ec5bb447 100644 --- a/server/index.js +++ b/server/index.js @@ -37,7 +37,6 @@ const CLIENT_ID = process.env.REACT_APP_SHARETRIBE_SDK_CLIENT_ID || '08ec69f6-d37e-414d-83eb-324e94afddf0'; const BASE_URL = process.env.REACT_APP_SHARETRIBE_SDK_BASE_URL || 'http://localhost:8088'; const USING_SSL = process.env.REACT_APP_SHARETRIBE_USING_SSL === 'true'; -const ENFORCE_SSL = process.env.SERVER_SHARETRIBE_ENFORCE_SSL === 'true'; const TRUST_PROXY = process.env.SERVER_SHARETRIBE_TRUST_PROXY || null; const app = express(); @@ -54,13 +53,13 @@ app.use(log.requestHandler()); // See: https://www.npmjs.com/package/helmet app.use(helmet()); -// Redirect HTTP to HTTPS if ENFORCE_SSL is `true`. +// Redirect HTTP to HTTPS if USING_SSL is `true`. // This also works behind reverse proxies (load balancers) as they are for example used by Heroku. // In such cases, however, the TRUST_PROXY parameter has to be set (see below) // // Read more: https://github.com/aredo/express-enforces-ssl // -if (ENFORCE_SSL) { +if (USING_SSL) { app.use(enforceSsl()); }