mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-06 18:21:39 +09:00
Always redirect to SSL if the current domain always uses SSL
This commit is contained in:
parent
b2157d2421
commit
2af279d6c3
1 changed files with 9 additions and 0 deletions
|
|
@ -270,6 +270,15 @@ class Context
|
|||
{
|
||||
$site_module_info = new stdClass;
|
||||
}
|
||||
|
||||
// Redirect to SSL if the current domain always uses SSL.
|
||||
if ($site_module_info->security === 'always' && !RX_SSL)
|
||||
{
|
||||
$ssl_url = self::getDefaultUrl($site_module_info) . RX_REQUEST_URL;
|
||||
self::setCacheControl(0);
|
||||
header('Location: ' . $ssl_url, true, 301);
|
||||
exit;
|
||||
}
|
||||
|
||||
// Load language support.
|
||||
$enabled_langs = self::loadLangSelected();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue