fix: Remove extra location
All checks were successful
Build Docker / Build Docker (push) Successful in 22s
All checks were successful
Build Docker / Build Docker (push) Successful in 22s
This commit is contained in:
parent
304bbf59e1
commit
abbd461f59
10
nginx.conf
10
nginx.conf
@ -30,17 +30,15 @@ server {
|
|||||||
set $upstream_host hnsns.net;
|
set $upstream_host hnsns.net;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Use the named location without the @ prefix
|
# Set proxy_pass based on the chosen upstream
|
||||||
proxy_pass https://dynamic_upstream;
|
|
||||||
}
|
|
||||||
|
|
||||||
location dynamic_upstream {
|
|
||||||
# Use a named location to set proxy_pass dynamically
|
|
||||||
proxy_pass https://$upstream_host;
|
proxy_pass https://$upstream_host;
|
||||||
|
|
||||||
proxy_ssl_verify off;
|
proxy_ssl_verify off;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
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 $upstream_addr;
|
||||||
add_header X-Load-Balancer-Node-Name $upstream_host;
|
add_header X-Load-Balancer-Node-Name $upstream_host;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user