mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
Fix #2351 redirect to default URL if lock screen is accessed using an unregistered domain
This commit is contained in:
parent
4c47793828
commit
2963d0b92c
1 changed files with 11 additions and 0 deletions
|
|
@ -1568,6 +1568,17 @@ class Context
|
|||
return;
|
||||
}
|
||||
|
||||
// If the site was visited using an unregistered domain, redirect to the default domain.
|
||||
$site_module_info = self::get('site_module_info');
|
||||
if (Rhymix\Framework\URL::getCurrentDomain() !== $site_module_info->domain)
|
||||
{
|
||||
$url = ($site_module_info->security === 'always') ? 'https://' : 'http://';
|
||||
$url = $url . Rhymix\Framework\URL::encodeIdna($site_module_info->domain);
|
||||
$url = $url . $_SERVER['REQUEST_URI'] ?? \RX_BASEURL;
|
||||
self::redirect($url);
|
||||
exit;
|
||||
}
|
||||
|
||||
// Set headers and constants for backward compatibility.
|
||||
header('HTTP/1.1 503 Service Unavailable');
|
||||
define('_XE_SITELOCK_', TRUE);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue