fix: Small bug in replacing host
All checks were successful
Build Docker / Build Docker (push) Successful in 28s

This commit is contained in:
Nathan Woodburn 2024-03-01 17:31:19 +11:00
parent 37379e4255
commit 39ca43bfb7
Signed by: nathanwoodburn
GPG Key ID: 203B000478AD0EF1
2 changed files with 3 additions and 3 deletions

View File

@ -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"]

View File

@ -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