diff --git a/metager/app/Http/Middleware/LocalizationRedirect.php b/metager/app/Http/Middleware/LocalizationRedirect.php index 432154c25b8aea30bf6d741ccee7424a4dfe7ed9..74eec2bb77e19948153d29b87623133c858b9315 100644 --- a/metager/app/Http/Middleware/LocalizationRedirect.php +++ b/metager/app/Http/Middleware/LocalizationRedirect.php @@ -44,6 +44,11 @@ class LocalizationRedirect $required_hostname = "metager.es"; } + // Allow the MetaGer review apps aswell + if (\preg_match("/\.review\.metager\.de$/", $host)) { + $allowed_hostnames[] = $host; + } + $url = url()->full(); if ($host !== $required_hostname && !\in_array($host, $allowed_hostnames) && preg_match("/^(https?:\/\/[^\/]+)(.*)/", $url, $matches)) { $new_host = \str_replace($host, $required_hostname, $matches[1]);