Skip to content

Commit e217d9d

Browse files
committed
Fix port-stripping redirect: use absolute_redirect off in nginx
1 parent e73545a commit e217d9d

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

nginx.conf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ server {
55
root /usr/share/nginx/html;
66
index index.html;
77

8+
# Use relative redirects so the original port (e.g. 9000 in local dev or a
9+
# reverse-proxy port in production) is preserved instead of being replaced
10+
# by nginx's internal port 80.
11+
absolute_redirect off;
12+
813
# Serve pre-compressed .gz files generated by gatsby-plugin-zopfli
914
gzip_static on;
1015

0 commit comments

Comments
 (0)