1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/qbittorrent_ynh.git synced 2024-09-03 20:16:10 +02:00
qbittorrent_ynh/conf/nginx.conf

27 lines
1.3 KiB
Nginx Configuration File
Raw Normal View History

2023-02-26 22:48:57 +01:00
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
2023-02-26 22:48:15 +01:00
location ^~ __PATH__/ {
proxy_pass http://127.0.0.1:__PORT__/;
proxy_http_version 1.1;
2023-02-26 22:48:57 +01:00
2023-02-26 22:48:15 +01:00
proxy_set_header Host 127.0.0.1:__PORT__;
proxy_set_header X-Forwarded-Host $http_host;
proxy_set_header X-Forwarded-For $remote_addr;
2023-02-26 22:48:57 +01:00
2023-02-26 22:48:15 +01:00
# not used by qBittorrent
#proxy_set_header X-Forwarded-Proto $scheme;
#proxy_set_header X-Real-IP $remote_addr;
2023-02-26 22:48:57 +01:00
2023-02-26 22:48:15 +01:00
# optionally, you can adjust the POST request size limit, to allow adding a lot of torrents at once
#client_max_body_size 100M;
2023-02-26 22:48:57 +01:00
2023-02-26 22:48:15 +01:00
# Since v4.2.2, is possible to configure qBittorrent
# to set the "Secure" flag for the session cookie automatically.
# However, that option does nothing unless using qBittorrent's built-in HTTPS functionality.
# For this use case, where qBittorrent itself is using plain HTTP
# (and regardless of whether or not the external website uses HTTPS),
# the flag must be set here, in the proxy configuration itself.
# Note: If this flag is set while the external website uses only HTTP, this will cause
# the login mechanism to not work without any apparent errors in console/network resulting in "auth loops".
proxy_cookie_path / "/; Secure";
2023-02-26 22:48:57 +01:00
}