From 39ca43bfb7c6a352abdd8a892c1279614f6f34ef Mon Sep 17 00:00:00 2001 From: Nathan Woodburn Date: Fri, 1 Mar 2024 17:31:19 +1100 Subject: [PATCH] fix: Small bug in replacing host --- .env.example | 2 +- main.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.env.example b/.env.example index 0491eef..d1f3462 100644 --- a/.env.example +++ b/.env.example @@ -1,4 +1,4 @@ PROXY=http://nathanwoodburn:5000/ TLD=woodburn RESTRICTED=["admin"] -REPLACE=["https://nathan.woodburn.au/"] \ No newline at end of file +REPLACE=["nathan.woodburn.au"] \ No newline at end of file diff --git a/main.py b/main.py index 23dc15f..2158f8f 100644 --- a/main.py +++ b/main.py @@ -119,9 +119,9 @@ def catch_all(path): # If content type is html if 'text/html' in res.headers['Content-Type']: content = res.content.decode('utf-8') - content = content.replace(URL, request.host_url) + content = content.replace(URL, request.host) 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) return response