Skip to content

Commit

Permalink
调整java/node反代时Host传递$server_port
Browse files Browse the repository at this point in the history
  • Loading branch information
showpy committed Feb 23, 2022
1 parent b7e7831 commit 16ec430
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion vhost/template/nginx/java_http.conf
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ server

location {api_url} {{
proxy_pass {url};
proxy_set_header Host {host};
proxy_set_header Host {host}:$server_port;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header REMOTE-HOST $remote_addr;
Expand Down
2 changes: 1 addition & 1 deletion vhost/template/nginx/node_http.conf
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ server

location / {{
proxy_pass {url};
proxy_set_header Host {host};
proxy_set_header Host {host}:$server_port;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header REMOTE-HOST $remote_addr;
Expand Down

0 comments on commit 16ec430

Please sign in to comment.