Skip to content

Commit 7fb8459

Browse files
authored
Merge pull request #433 from wcbing/patch-1
fix: http-to-https use $host and 308
2 parents ce7d952 + ff7e3e7 commit 7fb8459

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

template/block/http-to-https.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ value = ""
1111

1212
{{- if .host }}
1313
if ($host == {{ .host }}) {
14-
return 307 https://$server_name$request_uri;
14+
return 308 https://$host$request_uri;
1515
}
1616
return 404;
1717
{{ else }}
18-
return 307 https://$server_name$request_uri;
18+
return 308 https://$host$request_uri;
1919
{{- end }}

0 commit comments

Comments
 (0)