Problem with HTTPS in proxy mode
-
Fantastic plugin André, really appreciate it!
On my https site I had to comment one line in applyJSCodeChanges:
function applyJSCodeChanges($strCode) { // Change code if js/index.php should be used if (self::$aryGlobalSettings['track_mode'] == 1) { $strCode = str_replace('piwik.js', 'js/', $strCode); $strCode = str_replace('piwik.php', 'js/', $strCode); } elseif (self::$aryGlobalSettings['track_mode'] == 2) { $strCode = str_replace('piwik.js', 'piwik.php', $strCode); $strURL = str_replace('https://', '://', self::$aryGlobalSettings['piwik_url']); $strURL = str_replace('http://', '://', self::$aryGlobalSettings['piwik_url']); $strProxy = str_replace('https://', '://', plugins_url('wp-piwik')); //$strProxy = str_replace('http://', '://', plugins_url('wp-piwik')); <---- $strCode = str_replace($strURL, $strProxy, $strCode); }
I don’t think you can call str_replace on $strProxy twice in a row that way, you probably need an if there.
Cheers
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Problem with HTTPS in proxy mode’ is closed to new replies.