Переглянути джерело

Merge pull request #433 from wcbing/patch-1

fix: http-to-https use $host and 308
Jacky 1 рік тому
батько
коміт
7fb84597cf
1 змінених файлів з 2 додано та 2 видалено
  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 308 https://$host$request_uri;
     }
     return 404;
 {{ else }}
-return 307 https://$server_name$request_uri;
+return 308 https://$host$request_uri;
 {{- end }}