diff --git a/nginx.conf b/nginx.conf index 45dc3c6..7f9b2af 100644 --- a/nginx.conf +++ b/nginx.conf @@ -30,17 +30,15 @@ server { set $upstream_host hnsns.net; } - # Use the named location without the @ prefix - proxy_pass https://dynamic_upstream; - } - - location dynamic_upstream { - # Use a named location to set proxy_pass dynamically + # Set proxy_pass based on the chosen upstream proxy_pass https://$upstream_host; + proxy_ssl_verify off; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; + + # Show which node served the request in logs add_header X-Load-Balancer-Node $upstream_addr; add_header X-Load-Balancer-Node-Name $upstream_host; }