fix: Small bug in replacing host
All checks were successful
Build Docker / Build Docker (push) Successful in 28s
All checks were successful
Build Docker / Build Docker (push) Successful in 28s
This commit is contained in:
parent
37379e4255
commit
39ca43bfb7
@ -1,4 +1,4 @@
|
|||||||
PROXY=http://nathanwoodburn:5000/
|
PROXY=http://nathanwoodburn:5000/
|
||||||
TLD=woodburn
|
TLD=woodburn
|
||||||
RESTRICTED=["admin"]
|
RESTRICTED=["admin"]
|
||||||
REPLACE=["https://nathan.woodburn.au/"]
|
REPLACE=["nathan.woodburn.au"]
|
4
main.py
4
main.py
@ -119,9 +119,9 @@ def catch_all(path):
|
|||||||
# If content type is html
|
# If content type is html
|
||||||
if 'text/html' in res.headers['Content-Type']:
|
if 'text/html' in res.headers['Content-Type']:
|
||||||
content = res.content.decode('utf-8')
|
content = res.content.decode('utf-8')
|
||||||
content = content.replace(URL, request.host_url)
|
content = content.replace(URL, request.host)
|
||||||
for i in REPLACEMENT:
|
for i in REPLACEMENT:
|
||||||
content = content.replace(i, request.host_url)
|
content = content.replace(i, request.host)
|
||||||
response = make_response(content, res.status_code, headers)
|
response = make_response(content, res.status_code, headers)
|
||||||
return response
|
return response
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user