Skip to content

Commit b3677ab

Browse files
authored
feat(Docker): expose a SKIP_X_FORWARD_HEADERS option (#75)
1 parent a2319fd commit b3677ab

File tree

4 files changed

+6
-1
lines changed

4 files changed

+6
-1
lines changed

.env.dist

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ QBIT_BASE=http://host.docker.internal:8080
44
RELEASE_TYPE=stable
55
UPDATE_VT_CRON=0 * * * *
66
USE_INSECURE_SSL=false
7+
SKIP_X_FORWARD_HEADERS=false
78
VUETORRENT_PATH=/vuetorrent

docker-compose.gluetun.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,5 +56,7 @@ services:
5656
- UPDATE_VT_CRON=0 * * * *
5757
# Only enable if using self-signed certificates
5858
# - USE_INSECURE_SSL=true
59+
# Only enable if backend container is behind a proxy server which already add x-forward headers
60+
# - SKIP_X_FORWARD_HEADERS=true
5961
volumes:
6062
- "./data/config:/config"

docker-compose.simple.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ services:
3838
- UPDATE_VT_CRON=0 * * * *
3939
# Only enable if using self-signed certificates
4040
# - USE_INSECURE_SSL=true
41+
# Only enable if backend container is behind a proxy server which already add x-forward headers
42+
# - SKIP_X_FORWARD_HEADERS=true
4143
ports:
4244
- "8080:8080"
4345
volumes:

src/routers/qbit/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const router = Router()
66
router.use((req, res, next) => {
77
const proxy = httpProxy.createProxyServer({
88
host: process.env.QBIT_BASE,
9-
xfwd: true,
9+
xfwd: process.env.SKIP_X_FORWARD_HEADERS !== 'true',
1010
secure: process.env.USE_INSECURE_SSL !== 'true',
1111
})
1212
proxy.web(req, res, { target: `${process.env.QBIT_BASE}/api` }, next)

0 commit comments

Comments
 (0)