fix: add x-forwarded-host header

This commit is contained in:
2026-04-20 17:21:55 +02:00
parent 33cfd350a5
commit 452492a974
2 changed files with 7 additions and 0 deletions
+1
View File
@@ -136,6 +136,7 @@ class BaseHandler(abc.ABC, http.server.BaseHTTPRequestHandler):
def send_proxy(self, url: str) -> None:
headers = dict(self.headers)
headers["Host"] = urllib.parse.urlparse(url).netloc
headers["X-Forwarded-Host"] = self.host
headers["X-Forwarded-For"] = self.client_address[0]
headers["X-Real-IP"] = self.client_address[0]
try: