nginx: stop stripping cookies on qbittorrent vhost

qBit 5.2 caches uploaded .torrent metadata in the session; without QBT_SID the follow-up torrents/add fails 400.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
rope 2026-09-03 10:43:29 +01:00
parent f6c4a6b663
commit b85429fb76

View file

@ -129,12 +129,12 @@ in
# qBit's CSRF check rejects any request whose Referer origin differs # qBit's CSRF check rejects any request whose Referer origin differs
# from the Host — after Authelia's redirect the Referer is # from the Host — after Authelia's redirect the Referer is
# auth.nordhammer.it, which trips the check. Strip it so qBit skips. # auth.nordhammer.it, which trips the check. Strip it so qBit skips.
# Cookie stripped too so cached SID cookies don't fight localhost-bypass. # Cookies must pass through: qBit 5.2 caches an uploaded .torrent's
# metadata in the session, so parseMetadata and the following
# torrents/add need the same QBT_SID or the add fails 400.
"torrent.nordhammer.it" = lib.recursiveUpdate (protectedProxy 8080) { "torrent.nordhammer.it" = lib.recursiveUpdate (protectedProxy 8080) {
locations."/".extraConfig = autheliaAuthConfig + securityHeaders + '' locations."/".extraConfig = autheliaAuthConfig + securityHeaders + ''
proxy_set_header Referer ""; proxy_set_header Referer "";
proxy_set_header Cookie "";
proxy_hide_header Set-Cookie;
''; '';
}; };
"camera.nordhammer.it" = protectedProxy 1984; "camera.nordhammer.it" = protectedProxy 1984;