Resolve theme issues with https behind reverse proxy

Resolving 2 issues by changing the protocol to //.
When terminating https at the ACE level the HTTPS field is false
resulting in http requests for css on an https site.

Requesting the Roboto Slab font always goes over http. This is a problem
for browsers when the site is hosted over https.
This commit is contained in:
laughn-man 2014-10-07 14:45:24 -04:00
parent 312d847fc9
commit 39aaad2255
5 changed files with 6 additions and 8 deletions

View File

@ -198,8 +198,7 @@
$params['error_type'] = ErrorPage::NORMAL_ERROR_TYPE;
$params['index_key'] = 'index';
$params['docs_path'] = $this->docs_path;
$protocol = ((!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') || $_SERVER['SERVER_PORT'] == 443) ?
'https://' : 'http://';
$protocol = '//';
$params['base_url'] = $protocol . $this->base_url . '/';
$params['base_page'] = $params['base_url'];
$params['host'] = $this->host;
@ -228,8 +227,7 @@
case Daux::LIVE_MODE:
$params['docs_path'] = $this->docs_path;
$params['index_key'] = 'index';
$protocol = ((!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') || $_SERVER['SERVER_PORT'] == 443) ?
'https://' : 'http://';
$protocol = '//';
$params['base_url'] = $protocol . $this->base_url . '/';
$params['base_page'] = $params['base_url'];
$params['host'] = $this->host;

View File

@ -1,7 +1,7 @@
{
"favicon": "<base_url>themes/daux-blue/img/favicon-blue.png",
"css": ["<base_url>themes/daux-blue/css/daux-blue.css"],
"fonts": ["http://fonts.googleapis.com/css?family=Roboto+Slab:400,100,300,700&subset=latin,cyrillic-ext,cyrillic"],
"fonts": ["//fonts.googleapis.com/css?family=Roboto+Slab:400,100,300,700&subset=latin,cyrillic-ext,cyrillic"],
"js": [],
"require-jquery": true,
"bootstrap-js": false

View File

@ -1,7 +1,7 @@
{
"favicon": "<base_url>themes/daux-green/img/favicon-green.png",
"css": ["<base_url>themes/daux-green/css/daux-green.css"],
"fonts": ["http://fonts.googleapis.com/css?family=Roboto+Slab:400,100,300,700&subset=latin,cyrillic-ext,cyrillic"],
"fonts": ["//fonts.googleapis.com/css?family=Roboto+Slab:400,100,300,700&subset=latin,cyrillic-ext,cyrillic"],
"js": [],
"require-jquery": true,
"bootstrap-js": false

View File

@ -1,7 +1,7 @@
{
"favicon": "<base_url>themes/daux-navy/img/favicon-navy.png",
"css": ["<base_url>themes/daux-navy/css/daux-navy.css"],
"fonts": ["http://fonts.googleapis.com/css?family=Roboto+Slab:400,100,300,700&subset=latin,cyrillic-ext,cyrillic"],
"fonts": ["//fonts.googleapis.com/css?family=Roboto+Slab:400,100,300,700&subset=latin,cyrillic-ext,cyrillic"],
"js": [],
"require-jquery": true,
"bootstrap-js": false

View File

@ -1,7 +1,7 @@
{
"favicon": "<base_url>themes/daux-red/img/favicon-red.png",
"css": ["<base_url>themes/daux-red/css/daux-red.css"],
"fonts": ["http://fonts.googleapis.com/css?family=Roboto+Slab:400,100,300,700&subset=latin,cyrillic-ext,cyrillic"],
"fonts": ["//fonts.googleapis.com/css?family=Roboto+Slab:400,100,300,700&subset=latin,cyrillic-ext,cyrillic"],
"js": [],
"require-jquery": true,
"bootstrap-js": false