Nathan Woodburn
e04a72e89d
All checks were successful
Build Docker / Build Docker (push) Successful in 23s
32 lines
955 B
Nginx Configuration File
32 lines
955 B
Nginx Configuration File
upstream loadbalancer {
|
|
server doh.hnshosting.au:443 weight=1 max_fails=1 fail_timeout=30s;
|
|
server easyhandshake.com:8053 weight=1 max_fails=1 fail_timeout=30s;
|
|
server doh.hnsdns.com:443 weight=1 max_fails=1 fail_timeout=30s;
|
|
server hs.dnssec.dev:443 weight=1 max_fails=1 fail_timeout=30s;
|
|
server hnsns.net:443 weight=1 max_fails=1 fail_timeout=30s;
|
|
}
|
|
|
|
|
|
server {
|
|
listen 80;
|
|
# Catch all servers
|
|
server_name _;
|
|
|
|
location / {
|
|
# Get upstream host
|
|
set $upstream_host "";
|
|
|
|
# Randomly select a host
|
|
set $upstream_host loadbalancer;
|
|
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;
|
|
|
|
}
|
|
}
|