heather: fix syncthing host-check error behind Caddy reverse proxy
Syncthing отдаёт 403 'Host check error' когда Host header не совпадает с адресом прослушивания (127.0.0.1:8384) — это DNS rebinding protection. Caddy подменяет Host на бэкенде через header_up Host 127.0.0.1:8384.
This commit is contained in:
parent
483454bf17
commit
e99b6e1c28
1 changed files with 7 additions and 1 deletions
|
|
@ -35,8 +35,14 @@ in {
|
||||||
|
|
||||||
virtualHosts = {
|
virtualHosts = {
|
||||||
# --- Syncthing GUI (host-сервис) ---
|
# --- Syncthing GUI (host-сервис) ---
|
||||||
|
# header_up Host 127.0.0.1:8384 — обходим syncthing host-check (DNS
|
||||||
|
# rebinding protection): syncthing сравнивает Host header с адресом
|
||||||
|
# прослушивания (127.0.0.1:8384) и отдаёт 403 "Host check error" для
|
||||||
|
# внешних доменов. Подменяем Host на бэкенде.
|
||||||
"sync.iscg.dev".extraConfig = syncBasicAuth + ''
|
"sync.iscg.dev".extraConfig = syncBasicAuth + ''
|
||||||
reverse_proxy 127.0.0.1:8384
|
reverse_proxy 127.0.0.1:8384 {
|
||||||
|
header_up Host 127.0.0.1:8384
|
||||||
|
}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# --- Контейнеры (arion, см. arion-compose.nix) ---
|
# --- Контейнеры (arion, см. arion-compose.nix) ---
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue