Files
ethereum-rpc-docker/nginx-proxy/default.conf.template
Sebastian b90aefdce5 fix
2024-03-19 11:44:03 +01:00

25 lines
575 B
Plaintext

map $http_upgrade $proxy_connection {
default "https_backend${RPC_PATH}";
websocket "ws_backend${WS_PATH}";
}
server {
listen 80;
server_name example.com;
location / {
proxy_pass http://$proxy_connection;
proxy_set_header Host $host;
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;
}
}
upstream rpc_backend {
server ${PROXY_HOST}:${RPC_PORT};
}
upstream ws_backend {
server ${PROXY_HOST}:${WS_PORT};
}