fix: Remove extra location
All checks were successful
Build Docker / Build Docker (push) Successful in 22s

This commit is contained in:
Nathan Woodburn 2023-12-15 15:15:24 +11:00
parent 304bbf59e1
commit abbd461f59
Signed by: nathanwoodburn
GPG Key ID: 203B000478AD0EF1

View File

@ -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;
}