Files
homelab-nginx-templates/snippets/proxy.conf.template
T

20 lines
547 B
Plaintext

# restrict access
if ($allow_access = 0) {
return 403;
}
# set headers
proxy_set_header Host $host;
proxy_set_header X-Real-IP $trusted_client_ip;
proxy_set_header X-Forwarded-For $trusted_client_ip;
proxy_set_header X-Forwarded-Proto $scheme;
# clean headers
proxy_set_header X-Origin-Token '';
proxy_set_header EO-Connecting-IP '';
# enable websockets: http://nginx.org/en/docs/http/websocket.html
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;