fix: Set https in prod
All checks were successful
Build Docker / BuildImage (push) Successful in 30s

This commit is contained in:
2025-02-27 22:31:21 +11:00
parent 50275ba482
commit 6d77096a15
2 changed files with 21 additions and 0 deletions

View File

@@ -208,6 +208,13 @@ def proxy(url: str) -> requests.Response:
def cleanProxyContent(htmlContent: str,url:str, proxyHost: str):
# Set proxy host to https if not 127.0.0.1 or localhost
if ":5000" not in proxyHost:
proxyHost = proxyHost.replace("http","https")
# Find all instances of the url in the html
hostUrl = f"{urlparse(url).scheme}://{urlparse(url).netloc}"
proxyUrl = f"{proxyHost}proxy/{hostUrl}"