mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-08 09:28:41 +00:00
[Web] Fix TypeError with reverse proxy x-deluge-base header
The request header needs decoded otherwise string comparisons fail. Fixes: #3260
This commit is contained in:
parent
fc134cdffb
commit
4dd1f63b8b
2 changed files with 2 additions and 1 deletions
|
@ -5,6 +5,7 @@
|
||||||
### Web UI
|
### Web UI
|
||||||
|
|
||||||
- Fix TypeError in Peers Tab setting country flag.
|
- Fix TypeError in Peers Tab setting country flag.
|
||||||
|
- Fix reverse proxy header TypeError (#3260).
|
||||||
|
|
||||||
### Documentation
|
### Documentation
|
||||||
|
|
||||||
|
|
|
@ -571,7 +571,7 @@ class TopLevel(resource.Resource):
|
||||||
def getChildWithDefault(self, path, request): # NOQA: N802
|
def getChildWithDefault(self, path, request): # NOQA: N802
|
||||||
# Calculate the request base
|
# Calculate the request base
|
||||||
header = request.getHeader(b'x-deluge-base')
|
header = request.getHeader(b'x-deluge-base')
|
||||||
base = header if header else component.get('DelugeWeb').base
|
base = header.decode('utf-8') if header else component.get('DelugeWeb').base
|
||||||
|
|
||||||
# validate the base parameter
|
# validate the base parameter
|
||||||
if not base:
|
if not base:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue