mirror of
https://git.deluge-torrent.org/deluge
synced 2025-04-19 19:14:55 +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
|
||||
|
||||
- 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…
Add table
Reference in a new issue