nginx/https-redirect: use return instead of rewrite regex, $host instead of $server_name
[ach-master.git] / src / configuration / Webservers / nginx / default-hsts
index 0824740..a50136c 100644 (file)
@@ -26,7 +26,7 @@ server {
 
        # Make site accessible from http://localhost/
        server_name localhost;
-       rewrite        ^ https://$server_name$request_uri? permanent;
+       return 301 https://$host$request_uri;
 }