Skip to content

Commit

Permalink
fix apisix may lost port when forward host to upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
halfcrazy committed Jan 26, 2021
1 parent 3db8ebe commit 2ad03af
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions apisix/cli/ngx_tpl.lua
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ http {
# admin configuration snippet ends
set $upstream_scheme 'http';
set $upstream_host $host;
set $upstream_host $http_host;
set $upstream_uri '';
location /apisix/admin {
Expand Down Expand Up @@ -410,7 +410,7 @@ http {
# http server configuration snippet ends
set $upstream_scheme 'http';
set $upstream_host $host;
set $upstream_host $http_host;
set $upstream_uri '';
set $ctx_ref '';
Expand Down
2 changes: 1 addition & 1 deletion benchmark/fake-apisix/conf/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ http {

location / {
set $upstream_scheme 'http';
set $upstream_host $host;
set $upstream_host $http_host;
set $upstream_upgrade '';
set $upstream_connection '';
set $upstream_uri '';
Expand Down
2 changes: 1 addition & 1 deletion t/APISIX.pm
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ _EOC_
}
set \$upstream_scheme 'http';
set \$upstream_host \$host;
set \$upstream_host \$http_host;
set \$upstream_uri '';
set \$ctx_ref '';
set \$dubbo_service_name '';
Expand Down

0 comments on commit 2ad03af

Please sign in to comment.