diff --git a/template/block/http-to-https.conf b/template/block/http-to-https.conf index b53dbd48..65a31960 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 301 https://$host$request_uri; } return 404; {{ else }} -return 307 https://$server_name$request_uri; +return 301 https://$host$request_uri; {{- end }}