mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-02 01:52:10 +09:00
Move SSL redirection logic to Context::init()
This commit is contained in:
parent
65df40ad9f
commit
b5740052fc
15 changed files with 199 additions and 126 deletions
|
|
@ -114,22 +114,6 @@ class ModuleHandler extends Handler
|
|||
return;
|
||||
}
|
||||
|
||||
if(isset($this->act) && (strlen($this->act) >= 4 && substr_compare($this->act, 'disp', 0, 4) === 0))
|
||||
{
|
||||
if(Context::get('_use_ssl') == 'optional' && Context::isExistsSSLAction($this->act) && !RX_SSL)
|
||||
{
|
||||
if(Context::get('_https_port') != null)
|
||||
{
|
||||
header('location: https://' . $_SERVER['HTTP_HOST'] . ':' . Context::get('_https_port') . $_SERVER['REQUEST_URI']);
|
||||
}
|
||||
else
|
||||
{
|
||||
header('location: https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// call a trigger before moduleHandler init
|
||||
self::triggerCall('moduleHandler.init', 'before', $this);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue