Skip to content

Commit 01a4ff6

Browse files
committed
fix(router): use nginx $host in HTTPS redirects
1 parent def0d96 commit 01a4ff6

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

router/image/templates/nginx.conf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ http {
9898

9999
{{ if eq $enforceHTTPS "true" }}
100100
if ($access_scheme != "https") {
101-
return 301 https://$server_name$request_uri;
101+
return 301 https://$host$request_uri;
102102
}
103103
{{ end }}
104104
}
@@ -195,7 +195,7 @@ http {
195195

196196
{{ if eq $enforceHTTPS "true" }}
197197
if ($access_scheme != "https") {
198-
return 301 https://$server_name$request_uri;
198+
return 301 https://$host$request_uri;
199199
}
200200
{{ end }}
201201

@@ -245,7 +245,7 @@ http {
245245

246246
{{ if eq $enforceHTTPS "true" }}
247247
if ($access_scheme != "https") {
248-
return 301 https://$server_name$request_uri;
248+
return 301 https://$host$request_uri;
249249
}
250250
{{ end }}
251251

0 commit comments

Comments
 (0)