update ssl check

This commit is contained in:
Matteo Pagliazzi
2019-01-18 11:43:02 +01:00
parent 508d97d374
commit 40060e8ff5

View File

@@ -10,7 +10,7 @@ const BASE_URL_HOST = url.parse(BASE_URL).hostname;
function isHTTP (req) {
return ( // eslint-disable-line no-extra-parens
req.header('x-forwarded-proto') &&
req.header('x-forwarded-proto') !== 'https' &&
req.header('x-forwarded-proto') === 'http' &&
IS_PROD &&
BASE_URL.indexOf('https') === 0
);