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

Merge branch 'development' into 'master'

Development

See merge request !1578
parents de925f8d 343a5346
No related branches found
No related tags found
3 merge requests!1645Development,!1641Development,!1578Development
...@@ -16,13 +16,14 @@ class LocalizationRedirect ...@@ -16,13 +16,14 @@ class LocalizationRedirect
*/ */
public function handle($request, Closure $next) public function handle($request, Closure $next)
{ {
// We only redirect to the TLDs in the production version $locale = LaravelLocalization::getCurrentLocale();
if(env("APP_ENV", "") !== "production"){ $host = $request->getHttpHost();
// We only redirect to the TLDs in the production version and exclude our onion domain
if(env("APP_ENV", "") !== "production" || $host === "b7cxf4dkdsko6ah2.onion"){
return $next($request); return $next($request);
} }
$locale = LaravelLocalization::getCurrentLocale();
$host = $request->getHttpHost();
if($host !== "metager.de" && $locale == "de"){ if($host !== "metager.de" && $locale == "de"){
$url = $request->url(); $url = $request->url();
$url = str_replace($host, "metager.de", $url); $url = str_replace($host, "metager.de", $url);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment