mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-10 11:36:01 +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
@ -5,6 +5,7 @@
|
||||
### Web UI
|
||||
|
||||
- Fix TypeError in Peers Tab setting country flag.
|
||||
- Fix reverse proxy header TypeError (#3260).
|
||||
|
||||
### Documentation
|
||||
|
||||
|
@ -571,7 +571,7 @@ class TopLevel(resource.Resource):
|
||||
def getChildWithDefault(self, path, request): # NOQA: N802
|
||||
# Calculate the request 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
|
||||
if not base:
|
||||
|
Loading…
x
Reference in New Issue
Block a user