From e3c95d62951d13cc2808527edbe40ec4b5116bae Mon Sep 17 00:00:00 2001 From: Tom Date: Sun, 18 Feb 2018 14:21:55 +0000 Subject: [PATCH] qBittorrent Reverse Proxy enabled --- qbittorrent-nox/qbittorrent-nox-constants.sh | 1 + .../locations-available/qbittorrent.atomic.conf | 16 ++++++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/qbittorrent-nox/qbittorrent-nox-constants.sh b/qbittorrent-nox/qbittorrent-nox-constants.sh index fe5df75..7902681 100755 --- a/qbittorrent-nox/qbittorrent-nox-constants.sh +++ b/qbittorrent-nox/qbittorrent-nox-constants.sh @@ -22,3 +22,4 @@ APPSYSTEMDLOC=$SCRIPTPATH'/qbittorrent-nox/'$APPSYSTEMD APPINITD='qbittorrent-nox' APPINITDLOC=$SCRIPTPATH'/qbittorrent-nox/qbittorrent-nox.init' NGINXCONFNAME='qbittorrent' +PROXYREQSUFFIX='NO' diff --git a/utils/nginx/locations-available/qbittorrent.atomic.conf b/utils/nginx/locations-available/qbittorrent.atomic.conf index fa40b6e..b1462a5 100755 --- a/utils/nginx/locations-available/qbittorrent.atomic.conf +++ b/utils/nginx/locations-available/qbittorrent.atomic.conf @@ -1,4 +1,16 @@ # Version=1.0 -location /qbittorrent/ { - proxy_pass http://127.0.0.1:8086; +location /qbittorrent +{ + rewrite ^(.*[^/])$ $1/ permanent; +} + +location ~ /qbittorrent/(?.*) +{ + auth_basic "off"; + proxy_pass http://127.0.0.1:8086/$url; + proxy_hide_header Referer; + proxy_hide_header Origin; + proxy_set_header Referer ''; + proxy_set_header Origin ''; + add_header X-Frame-Options "SAMEORIGIN"; }