From eec88210f7a137bf117e076c2c7ae2f98bee7be7 Mon Sep 17 00:00:00 2001 From: William Floyd Date: Thu, 6 Feb 2025 21:44:39 +0530 Subject: [PATCH] fix: Remove forwarding headers to fix remote connection. --- docker-compose.yaml | 2 +- qbittorrent/qbittorrent.go | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/docker-compose.yaml b/docker-compose.yaml index 7de1486..c4a3e59 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -9,7 +9,7 @@ services: COMPOSE_PROJECT_NAME: ${COMPOSE_PROJECT_NAME} MULTIPLEXER_PORT: ${MULTIPLEXER_PORT} volumes: - - ./config.yaml.example:/config/config.yaml + - ./config.yaml.example:/root/config.yaml build: . develop: watch: diff --git a/qbittorrent/qbittorrent.go b/qbittorrent/qbittorrent.go index 4adf469..dd441df 100644 --- a/qbittorrent/qbittorrent.go +++ b/qbittorrent/qbittorrent.go @@ -253,7 +253,11 @@ func (i *Instance) PrepareRequest(r *http.Request) (newReq *http.Request) { newReq.Header.Set("Referer", i.URL.JoinPath("/").String()) newReq.Header.Del("Origin") newReq.Header.Del("Cookie") + newReq.Header.Del("Referer-Policy") newReq.Header.Del("Accept-Encoding") + newReq.Header.Del("X-Forwarded-Proto") + newReq.Header.Del("X-Forwarded-For") + newReq.Header.Del("X-Forwarded-Host") return