Browse Source

fix: http-to-https use $host and 301

11 months ago
parent
commit
bd6609226b
1 changed files with 2 additions and 2 deletions
  1. 2 2
      template/block/http-to-https.conf

+ 2 - 2
template/block/http-to-https.conf

@@ -11,9 +11,9 @@ value = ""
 
 {{- if .host }}
     if ($host == {{ .host }}) {
-        return 307 https://$server_name$request_uri;
+        return 301 https://$host$request_uri;
     }
     return 404;
 {{ else }}
-return 307 https://$server_name$request_uri;
+return 301 https://$host$request_uri;
 {{- end }}