Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#2594 closed Bug (fixed)

assume_secure_protocol is not checked in View

Reported by: gator Owned by:
Priority: normal Milestone: 1.6 Piwik 1.6
Component: Core Keywords:
Cc: Sensitive: no


When running behind a reverse proxy with ssl, the config variable assume_secure_protocol is set to 1. This seems to set the url protocol (https) correctly everyplace except in the dashboard javascript. The piwik.piwik_url variable in the global js still has "http" for the protocol. To fix this I added the Piwik::isHttps check to core/View.php after $this->piwikUrl is set (line 45):


&& strpos($this->piwikUrl, 'http://') === 0)


$this->piwikUrl = str_replace('http://', 'https://', $this->piwikUrl);


Change History (3)

comment:1 Changed 3 years ago by vipsoft (robocoder)

  • Keywords ssl reverse proxy removed
  • Milestone set to 1.6 Piwik 1.6

comment:2 Changed 3 years ago by vipsoft (robocoder)

  • Resolution set to fixed
  • Status changed from new to closed

(In [5068]) * fixes #2594 - apply gator's patch

  • currentUrlWithoutFilename is redundant; consolidate with piwikUrl
Note: See TracTickets for help on using tickets.