1
0

Cloudflare-tunnel: Pass the original client's IP address to BTCPayServer (#668)

This commit is contained in:
Nicolas Dorier
2022-07-01 22:08:07 +09:00
committed by GitHub
parent d8a9cb5b40
commit f04530c032
3 changed files with 13 additions and 3 deletions

View File

@@ -21,6 +21,7 @@
{{ end }}
{{ define "redirects" }}
{{ if eq $.HostName "btcpay" }}
{{ range $container := $.Containers }}
@@ -35,6 +36,12 @@
rewrite ^/lnd-rest/btc/(.*) /$1 break;
proxy_pass http://lnd_bitcoin:8080/;
}
{{ end }}
{{ if $container.Env.REAL_IP_HEADER }}
{{ range $containerNetwork := $container.Networks }}
set_real_ip_from {{ $containerNetwork.IP }};
{{ end }}
real_ip_header {{ $container.Env.REAL_IP_HEADER }};
{{ end }}
{{ if (eq $serviceName "bitcoin_rtl") }}
location /rtl/ {