mirror of
https://github.com/mempool/mempool.git
synced 2024-11-20 10:21:52 +01:00
81bc449043
This patch was generated by replacing: `proxy_set_header Host $http_host` -> `proxy_set_header Host $host` Script: find . -type f -exec sed -i 's|proxy_set_header Host \$http_host|proxy_set_header Host \$host|g' {} \; Fixes test error: ``` >> Problem: [host_spoofing] The proxied Host header may be spoofed. Description: In most cases "$host" variable are more appropriate, just use it. Additional info: https://github.com/yandex/gixy/blob/master/docs/en/plugins/hostspoofing.md ``` `proxy_set_header Host $host` is indeed the recommended default proxy header setting.
21 lines
540 B
Plaintext
21 lines
540 B
Plaintext
# route lightning API endpoints to lightning backend
|
|
location /api/v1/lightning {
|
|
try_files /dev/null @mempool-api-v1-lightning;
|
|
}
|
|
location @mempool-api-v1-lightning {
|
|
proxy_pass $mempoolMainnetLightning;
|
|
|
|
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;
|
|
|
|
proxy_cache_background_update on;
|
|
proxy_cache_use_stale updating;
|
|
proxy_cache api;
|
|
proxy_cache_valid 200 10s;
|
|
proxy_redirect off;
|
|
|
|
expires 10s;
|
|
}
|