Skip to content

Commit

Permalink
Pass hostname to proxied host
Browse files Browse the repository at this point in the history
  • Loading branch information
xendk authored and arnested committed Dec 12, 2024
1 parent 7da3d86 commit d42bd66
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 2 additions & 0 deletions context/nextjs/etc/nginx/templates/default.conf.template
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,7 @@ server {
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
5 changes: 4 additions & 1 deletion context/proxy/etc/nginx/templates/default.conf.template
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ server {
root ${NGINX_DOCUMENT_ROOT};

location / {
proxy_pass ${NGINX_PROXY_PASS};
proxy_pass ${NGINX_PROXY_PASS};
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
4 changes: 4 additions & 0 deletions context/storybook/etc/nginx/templates/default.conf.template
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ server {
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}

location /storybook-server-channel {
Expand All @@ -22,5 +24,7 @@ server {
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}

0 comments on commit d42bd66

Please sign in to comment.