let backgrounds be put under SSL
This commit is contained in:
parent
b96af33d97
commit
3018683718
2
README
2
README
@ -1521,6 +1521,8 @@ dir: directory to write backgrounds too. Default is '/background/'
|
|||||||
subdir of install dir.
|
subdir of install dir.
|
||||||
path: path to backgrounds. Default is sub-path of install path; note
|
path: path to backgrounds. Default is sub-path of install path; note
|
||||||
that you may need to change this if you change site-path too.
|
that you may need to change this if you change site-path too.
|
||||||
|
ssl: Whether or not to use HTTPS for background files. Defaults to
|
||||||
|
null, meaning to guess from site-wide SSL settings.
|
||||||
|
|
||||||
ping
|
ping
|
||||||
----
|
----
|
||||||
|
@ -155,9 +155,20 @@ class Design extends Memcached_DataObject
|
|||||||
$server = common_config('site', 'server');
|
$server = common_config('site', 'server');
|
||||||
}
|
}
|
||||||
|
|
||||||
// XXX: protocol
|
$ssl = common_config('background', 'ssl');
|
||||||
|
|
||||||
return 'http://'.$server.$path.$filename;
|
if (is_null($ssl)) { // null -> guess
|
||||||
|
if (common_config('site', 'ssl') == 'always' &&
|
||||||
|
!common_config('background', 'server')) {
|
||||||
|
$ssl = true;
|
||||||
|
} else {
|
||||||
|
$ssl = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$protocol = ($ssl) ? 'https' : 'http';
|
||||||
|
|
||||||
|
return $protocol.'://'.$server.$path.$filename;
|
||||||
}
|
}
|
||||||
|
|
||||||
function setDisposition($on, $off, $tile)
|
function setDisposition($on, $off, $tile)
|
||||||
|
@ -116,7 +116,8 @@ $default =
|
|||||||
'background' =>
|
'background' =>
|
||||||
array('server' => null,
|
array('server' => null,
|
||||||
'dir' => INSTALLDIR . '/background/',
|
'dir' => INSTALLDIR . '/background/',
|
||||||
'path' => $_path . '/background/'),
|
'path' => $_path . '/background/',
|
||||||
|
'ssl' => null),
|
||||||
'public' =>
|
'public' =>
|
||||||
array('localonly' => true,
|
array('localonly' => true,
|
||||||
'blacklist' => array(),
|
'blacklist' => array(),
|
||||||
|
Loading…
Reference in New Issue
Block a user