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
+6
View File
@@ -756,6 +756,7 @@ class TestRequestHandler(BaseHandlerTestCase):
"data": None,
"headers": {
"Host": "example.com",
"X-Forwarded-Host": "localhost",
"X-Forwarded-For": "127.0.0.1",
"X-Real-IP": "127.0.0.1",
},
@@ -795,6 +796,7 @@ class TestRequestHandler(BaseHandlerTestCase):
"data": b"hello",
"headers": {
"Host": "example.com",
"X-Forwarded-Host": "localhost",
"X-Forwarded-For": "127.0.0.1",
"X-Real-IP": "127.0.0.1",
"Content-Length": "5",
@@ -834,6 +836,7 @@ class TestRequestHandler(BaseHandlerTestCase):
"data": None,
"headers": {
"Host": "example.com",
"X-Forwarded-Host": "localhost",
"X-Forwarded-For": "127.0.0.1",
"X-Real-IP": "127.0.0.1",
},
@@ -864,6 +867,7 @@ class TestRequestHandler(BaseHandlerTestCase):
"data": None,
"headers": {
"Host": "example.com",
"X-Forwarded-Host": "localhost",
"X-Forwarded-For": "127.0.0.1",
"X-Real-IP": "127.0.0.1",
},
@@ -903,6 +907,7 @@ class TestRequestHandler(BaseHandlerTestCase):
"data": None,
"headers": {
"Host": "example.com",
"X-Forwarded-Host": "localhost",
"X-Forwarded-For": "127.0.0.1",
"X-Real-IP": "127.0.0.1",
},
@@ -939,6 +944,7 @@ class TestRequestHandler(BaseHandlerTestCase):
"data": None,
"headers": {
"Host": "example.com",
"X-Forwarded-Host": "host",
"X-Forwarded-For": "127.0.0.1",
"X-Real-IP": "127.0.0.1",
},