diff --git a/template/block/http-to-https.conf b/template/block/http-to-https.conf index b53dbd48b..149d87e08 100644 --- a/template/block/http-to-https.conf +++ b/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 }}