diff --git a/config/balancer/conf.d/balancer-server.conf b/config/balancer/conf.d/balancer-server.conf index cf31999..6cca766 100644 --- a/config/balancer/conf.d/balancer-server.conf +++ b/config/balancer/conf.d/balancer-server.conf @@ -10,7 +10,7 @@ server { } location / { - set $pass_access_scheme $scheme; + set $pass_access_scheme $the_scheme; set $pass_server_port $server_port; set $best_http_host $http_host; diff --git a/config/balancer/nginx.conf b/config/balancer/nginx.conf index d2dd27c..fc26dae 100644 --- a/config/balancer/nginx.conf +++ b/config/balancer/nginx.conf @@ -71,6 +71,11 @@ http { "" $request_id; } + map $http_x_forwarded_proto $the_scheme { + default $http_x_forwarded_proto; + "" $scheme; + } + upstream main_balancer { server 0.0.0.1; # placeholder