Skip to content

Commit 3dfe238

Browse files
authored
Add two new headers to proxy.conf
Fixes #1609. Adding both X-Forwarded-Host and X-Forwarded-Port, this is vital for some services behind a proxy (used to allow creation of absolute links in html). I've had to include at least the Host version in the past for jenkins and nexus. Been running locally for 24 hours, does not appear to break any of my 15+ services currently running behind NPM would allow people to host those services without the need for advanced configuration
1 parent d45f39a commit 3dfe238

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

docker/rootfs/etc/nginx/conf.d/include/proxy.conf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ add_header X-Served-By $host;
22
proxy_set_header Host $host;
33
proxy_set_header X-Forwarded-Scheme $scheme;
44
proxy_set_header X-Forwarded-Proto $scheme;
5+
proxy_set_header X-Forwarded-Host $host;
6+
proxy_set_header X-Forwarded-Port $port;
57
proxy_set_header X-Forwarded-For $remote_addr;
68
proxy_set_header X-Real-IP $remote_addr;
79
proxy_pass $forward_scheme://$server:$port$request_uri;

0 commit comments

Comments
 (0)