Skip to content
Snippets Groups Projects
Commit 800ea146 authored by Dominik Hebeler's avatar Dominik Hebeler
Browse files

syntax error

parent f13cd66f
No related branches found
No related tags found
2 merge requests!2010Development,!2001Resolve "Improve Localization"
......@@ -4,6 +4,7 @@ namespace App\Http\Middleware;
use Closure;
use LaravelLocalization;
use URL;
class LocalizationRedirect
{
......@@ -54,7 +55,7 @@ class LocalizationRedirect
$allowed_hostnames[] = $host;
}
$url = url()->full();
$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]);
$new_url = $new_host . $matches[2];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment