diff --git a/config/global.ini.php b/config/global.ini.php index 4a9f8be2439ebee62d20077db47620c23699b60b..b4a0b6aa36cb63b7a16b2aebbc023147ed792f4c 100644 --- a/config/global.ini.php +++ b/config/global.ini.php @@ -184,9 +184,10 @@ jquery_version = 1.5 jqueryui_version = 1.8.9 swfobject_version = 2.2 -; Set to 1 if using a reverse proxy (https to http) -; or your web server doesn't set $_SERVER['HTTPS'] when using https -reverse_proxy = 0 +; Set to 1 if you're using https on your Piwik server and Piwik can't detect it, +; e.g., a reverse proxy using https-to-http, or a web server that doesn't +; set the HTTPS environment variable. +assume_secure_protocol = 0 ; List of proxy headers for client IP addresses ; diff --git a/core/Piwik.php b/core/Piwik.php index 1d6087c71522eee88b6ecfa42dc4baf35915c470..3b922e9144224cb9afa90873fdd1e6450a04d579 100644 --- a/core/Piwik.php +++ b/core/Piwik.php @@ -110,7 +110,7 @@ class Piwik */ static public function isHttps() { - return Piwik_Url::getCurrentScheme() === 'https' || Zend_Registry::get('config')->General->reverse_proxy; + return Piwik_Url::getCurrentScheme() === 'https' || Zend_Registry::get('config')->General->assume_secure_protocol; } /** diff --git a/lang/en.php b/lang/en.php index dd6cac3a7f82b1950353e778d5bd37719177cd9f..198b53203dd7f451e4beeea633a8360afe3d6cdb 100644 --- a/lang/en.php +++ b/lang/en.php @@ -580,8 +580,8 @@ $translations = array( 'Installation_SystemCheckAutoUpdateHelp' => 'Note: Piwik\'s One Click update requires write-permissions to the Piwik folder and its contents.', 'Installation_SystemCheckError' => 'An error occured - must be fixed before you proceed', 'Installation_SystemCheckWarning' => 'Piwik will work normally but some features may be missing', - 'Installation_SystemCheckReverseProxy' => 'Reverse Proxy', - 'Installation_SystemCheckReverseProxyHelp' => 'It appears you are behind a reverse proxy. These lines will be added to config/config.ini.php:', + 'Installation_SystemCheckSecureProtocol' => 'Secure protocol', + 'Installation_SystemCheckSecureProtocolHelp' => 'It appears you\'re using https with your web server. These lines will be added to config/config.ini.php:', 'Installation_SystemCheckIpv4' => 'IPv4', 'Installation_SystemCheckIpv4Help' => 'You should disable IPv6 in your web server configuration.', 'Installation_SystemCheckTracker' => 'Tracker status', diff --git a/plugins/Installation/Controller.php b/plugins/Installation/Controller.php index 12c82adf667b608f52749e43847b4c34c110af8c..d9b6178febc857bb9bdaefca2fbb656588d76344 100644 --- a/plugins/Installation/Controller.php +++ b/plugins/Installation/Controller.php @@ -849,7 +849,7 @@ class Piwik_Installation_Controller extends Piwik_Controller $infos['protocol'] = Piwik_ProxyHeaders::getProtocolInformation(); if(Piwik_Url::getCurrentScheme() == 'http' && $infos['protocol'] !== null) { - $infos['general_infos']['reverse_proxy'] = '1'; + $infos['general_infos']['secure_protocol'] = '1'; } if(count($headers = Piwik_ProxyHeaders::getProxyClientHeaders()) > 0) { diff --git a/plugins/Installation/templates/systemCheck.tpl b/plugins/Installation/templates/systemCheck.tpl index 5d0695f2fbb334543527867d3c7bc337f817653b..b6892b0c1a20fd872929cf1b1c752dd719d0efdc 100644 --- a/plugins/Installation/templates/systemCheck.tpl +++ b/plugins/Installation/templates/systemCheck.tpl @@ -210,11 +210,11 @@ {/foreach} </td> </tr> - {if isset($infos.general_infos.reverse_proxy)} + {if isset($infos.general_infos.secure_protocol)} <tr> - <td class="label">{'Installation_SystemCheckReverseProxy'|translate}</td> + <td class="label">{'Installation_SystemCheckSecureProtocol'|translate}</td> <td> - {$warning} {$infos.protocol}<br /><i>{'Installation_SystemCheckReverseProxyHelp'|translate}</i><br /><br /><code>[General]</code><br /><code>reverse_proxy = 1</code><br /> + {$warning} {$infos.protocol}<br /><i>{'Installation_SystemCheckSecureProtocolHelp'|translate}</i><br /><br /><code>[General]</code><br /><code>assume_secure_protocol = 1</code><br /> </td> </tr> {/if}