From 8e9ddd3d503d7035a9fa8472bc1a2e7625bc0a6f Mon Sep 17 00:00:00 2001 From: Timo Stramann <21283057+TimoStramann@users.noreply.github.com> Date: Sun, 18 Aug 2019 16:07:59 +0200 Subject: [PATCH] Remove unnecessary slash for SSL redirect Remove slash after hostname since requests directly to the hostname do not require a slash at the end and all other content goes to `$request_uri` which starts with shlash, hence no longer doubleslashes on hostname only queries. --- lib/Froxlor/Cron/Http/Nginx.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Froxlor/Cron/Http/Nginx.php b/lib/Froxlor/Cron/Http/Nginx.php index c34cff9a..414eb11c 100644 --- a/lib/Froxlor/Cron/Http/Nginx.php +++ b/lib/Froxlor/Cron/Http/Nginx.php @@ -244,7 +244,7 @@ class Nginx extends HttpConfigBase $is_redirect = false; } else { $_sslport = $this->checkAlternativeSslPort(); - $mypath = 'https://' . Settings::Get('system.hostname') . $_sslport . '/'; + $mypath = 'https://' . Settings::Get('system.hostname') . $_sslport; $this->nginx_data[$vhost_filename] .= "\t" . 'location / {' . "\n"; $this->nginx_data[$vhost_filename] .= "\t\t" . 'return 301 ' . $mypath . '$request_uri;' . "\n"; $this->nginx_data[$vhost_filename] .= "\t" . '}' . "\n";