Commit 56a6dd57 authored by Dominik Hebeler's avatar Dominik Hebeler

Excluded onion domain from redirect

parent fffd6bd3
......@@ -16,13 +16,14 @@ class LocalizationRedirect
*/
public function handle($request, Closure $next)
{
// We only redirect to the TLDs in the production version
if(env("APP_ENV", "") !== "production"){
$locale = LaravelLocalization::getCurrentLocale();
$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);
}
$locale = LaravelLocalization::getCurrentLocale();
$host = $request->getHttpHost();
if($host !== "metager.de" && $locale == "de"){
$url = $request->url();
$url = str_replace($host, "metager.de", $url);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment