fix: add X-Forwarded-Proto header
This commit is contained in:
+24
-12
@@ -756,11 +756,13 @@ class TestRequestHandler(BaseHandlerTestCase):
|
||||
"data": None,
|
||||
"headers": {
|
||||
"Host": "example.com",
|
||||
"X-Real-IP": "127.0.0.1",
|
||||
"X-Forwarded-Host": "localhost",
|
||||
"X-Forwarded-For": "127.0.0.1",
|
||||
"X-Real-IP": "127.0.0.1",
|
||||
"X-Forwarded-Proto": "https",
|
||||
},
|
||||
"timeout": 240,
|
||||
"allow_redirects": True,
|
||||
"timeout": 480,
|
||||
},
|
||||
),
|
||||
self.expects_status_only(handler, 200, "OK"),
|
||||
@@ -796,12 +798,14 @@ class TestRequestHandler(BaseHandlerTestCase):
|
||||
"data": b"hello",
|
||||
"headers": {
|
||||
"Host": "example.com",
|
||||
"X-Real-IP": "127.0.0.1",
|
||||
"X-Forwarded-Host": "localhost",
|
||||
"X-Forwarded-For": "127.0.0.1",
|
||||
"X-Real-IP": "127.0.0.1",
|
||||
"X-Forwarded-Proto": "https",
|
||||
"Content-Length": "5",
|
||||
},
|
||||
"timeout": 240,
|
||||
"allow_redirects": True,
|
||||
"timeout": 480,
|
||||
},
|
||||
),
|
||||
self.expects_status_only(handler, 200, "OK"),
|
||||
@@ -836,11 +840,13 @@ class TestRequestHandler(BaseHandlerTestCase):
|
||||
"data": None,
|
||||
"headers": {
|
||||
"Host": "example.com",
|
||||
"X-Real-IP": "127.0.0.1",
|
||||
"X-Forwarded-Host": "localhost",
|
||||
"X-Forwarded-For": "127.0.0.1",
|
||||
"X-Real-IP": "127.0.0.1",
|
||||
"X-Forwarded-Proto": "https",
|
||||
},
|
||||
"timeout": 240,
|
||||
"allow_redirects": True,
|
||||
"timeout": 480,
|
||||
},
|
||||
),
|
||||
self.expects_basic_body(handler, "hello", message="OK"),
|
||||
@@ -867,11 +873,13 @@ class TestRequestHandler(BaseHandlerTestCase):
|
||||
"data": None,
|
||||
"headers": {
|
||||
"Host": "example.com",
|
||||
"X-Real-IP": "127.0.0.1",
|
||||
"X-Forwarded-Host": "localhost",
|
||||
"X-Forwarded-For": "127.0.0.1",
|
||||
"X-Real-IP": "127.0.0.1",
|
||||
"X-Forwarded-Proto": "https",
|
||||
},
|
||||
"timeout": 240,
|
||||
"allow_redirects": True,
|
||||
"timeout": 480,
|
||||
},
|
||||
) as request_mock,
|
||||
self.expects_status_only(
|
||||
@@ -907,11 +915,13 @@ class TestRequestHandler(BaseHandlerTestCase):
|
||||
"data": None,
|
||||
"headers": {
|
||||
"Host": "example.com",
|
||||
"X-Real-IP": "127.0.0.1",
|
||||
"X-Forwarded-Host": "localhost",
|
||||
"X-Forwarded-For": "127.0.0.1",
|
||||
"X-Real-IP": "127.0.0.1",
|
||||
"X-Forwarded-Proto": "https",
|
||||
},
|
||||
"timeout": 240,
|
||||
"allow_redirects": True,
|
||||
"timeout": 480,
|
||||
},
|
||||
),
|
||||
self.expects_status_only(handler, 200, "OK"),
|
||||
@@ -944,11 +954,13 @@ class TestRequestHandler(BaseHandlerTestCase):
|
||||
"data": None,
|
||||
"headers": {
|
||||
"Host": "example.com",
|
||||
"X-Real-IP": "127.0.0.1",
|
||||
"X-Forwarded-Host": "host",
|
||||
"X-Forwarded-For": "127.0.0.1",
|
||||
"X-Real-IP": "127.0.0.1",
|
||||
"X-Forwarded-Proto": "https",
|
||||
},
|
||||
"timeout": 240,
|
||||
"allow_redirects": True,
|
||||
"timeout": 480,
|
||||
},
|
||||
),
|
||||
self.expects_status_only(handler, 200, "OK"),
|
||||
|
||||
Reference in New Issue
Block a user