Skip to content

Commit

Permalink
refactor: use sidecar for lightning route
Browse files Browse the repository at this point in the history
  • Loading branch information
michael1011 committed Jan 31, 2025
1 parent 0f9ea7b commit 27b0d4c
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions data/backend-nginx/default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,23 @@ server {
proxy_set_header X-Forwarded-Proto $scheme;
}

location /v2/lightning {
if ($request_method = OPTIONS) {
add_header Access-Control-Allow-Origin "*";
add_header Access-Control-Allow-Methods 'GET, POST, OPTIONS';
add_header Access-Control-Allow-Headers "*";
add_header Content-Type text/plain;
add_header Content-Length 0;
return 204;
}
proxy_pass http://boltz:9005;
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;
add_header Access-Control-Allow-Origin "*";
}

location / {
proxy_pass http://boltz:9001;
proxy_set_header Host $http_host;
Expand Down

0 comments on commit 27b0d4c

Please sign in to comment.