49 lines
1.1 KiB
Text
49 lines
1.1 KiB
Text
upstream boltz {
|
|
server boltz:9001;
|
|
}
|
|
|
|
upstream boltzr {
|
|
server boltz:9005;
|
|
}
|
|
|
|
upstream ws {
|
|
server boltz:9004;
|
|
}
|
|
|
|
server {
|
|
listen 9001;
|
|
listen [::]:9001;
|
|
server_name localhost;
|
|
|
|
add_header Access-Control-Allow-Origin "*" always;
|
|
add_header Access-Control-Allow-Methods 'GET, PATCH, DELETE, POST, OPTIONS' always;
|
|
add_header Access-Control-Allow-Headers "*" always;
|
|
|
|
proxy_set_header Host $http_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;
|
|
|
|
if ($request_method = OPTIONS) {
|
|
return 204;
|
|
}
|
|
|
|
location /v2/ws {
|
|
proxy_pass http://ws/;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "Upgrade";
|
|
}
|
|
|
|
location ~ ^/v2/(lightning|swap/rescue|swap/restore) {
|
|
proxy_pass http://boltzr;
|
|
}
|
|
|
|
location /streamswapstatus {
|
|
proxy_pass http://boltzr;
|
|
}
|
|
|
|
location / {
|
|
proxy_pass http://boltz;
|
|
}
|
|
}
|