From ce9f0799ed2aedc0526b4f0d0e424598a1dab374 Mon Sep 17 00:00:00 2001 From: GotPPay Date: Thu, 2 Aug 2018 14:31:03 +0200 Subject: [PATCH] stop forcing https locally --- backend/config/application.php | 10 ---------- backend/config/environments/production.php | 10 ++++++++++ backend/config/environments/staging.php | 10 ++++++++++ 3 files changed, 20 insertions(+), 10 deletions(-) diff --git a/backend/config/application.php b/backend/config/application.php index 3903cf3..e12625e 100644 --- a/backend/config/application.php +++ b/backend/config/application.php @@ -23,16 +23,6 @@ if (file_exists($env_config)) { require_once $env_config; } -/** - * Stops redirect loop on login page - */ -define('FORCE_SSL_ADMIN', true); -// in some setups HTTP_X_FORWARDED_PROTO might contain -// a comma-separated list e.g. http,https -// so check for https existence -if (strpos($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') !== false) - $_SERVER['HTTPS']='on'; - /** * URLs */ diff --git a/backend/config/environments/production.php b/backend/config/environments/production.php index 162c71c..5c39f79 100644 --- a/backend/config/environments/production.php +++ b/backend/config/environments/production.php @@ -5,3 +5,13 @@ define('WP_DEBUG_DISPLAY', false); define('SCRIPT_DEBUG', false); /** Disable all file modifications including updates and update notifications */ define('DISALLOW_FILE_MODS', true); + +/** + * Stops redirect loop on login page + */ +define('FORCE_SSL_ADMIN', true); +// in some setups HTTP_X_FORWARDED_PROTO might contain +// a comma-separated list e.g. http,https +// so check for https existence +if (strpos($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') !== false) + $_SERVER['HTTPS']='on'; \ No newline at end of file diff --git a/backend/config/environments/staging.php b/backend/config/environments/staging.php index 528be4a..55fa1c7 100644 --- a/backend/config/environments/staging.php +++ b/backend/config/environments/staging.php @@ -5,3 +5,13 @@ define('WP_DEBUG_DISPLAY', false); define('SCRIPT_DEBUG', false); /** Disable all file modifications including updates and update notifications */ define('DISALLOW_FILE_MODS', true); + +/** + * Stops redirect loop on login page + */ +define('FORCE_SSL_ADMIN', true); +// in some setups HTTP_X_FORWARDED_PROTO might contain +// a comma-separated list e.g. http,https +// so check for https existence +if (strpos($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') !== false) + $_SERVER['HTTPS']='on';