diff --git a/src/handlers.py b/src/handlers.py index 46f478d..aec25dd 100644 --- a/src/handlers.py +++ b/src/handlers.py @@ -146,7 +146,7 @@ class BaseHandler(abc.ABC, http.server.BaseHTTPRequestHandler): url, data=body, headers=headers, - allow_redirects=True, + allow_redirects=False, timeout=480, ) except Exception as e: diff --git a/tests/test_handlers.py b/tests/test_handlers.py index 50aa702..acc7014 100644 --- a/tests/test_handlers.py +++ b/tests/test_handlers.py @@ -761,7 +761,7 @@ class TestRequestHandler(BaseHandlerTestCase): "X-Forwarded-For": "127.0.0.1", "X-Forwarded-Proto": "https", }, - "allow_redirects": True, + "allow_redirects": False, "timeout": 480, }, ), @@ -804,7 +804,7 @@ class TestRequestHandler(BaseHandlerTestCase): "X-Forwarded-Proto": "https", "Content-Length": "5", }, - "allow_redirects": True, + "allow_redirects": False, "timeout": 480, }, ), @@ -845,7 +845,7 @@ class TestRequestHandler(BaseHandlerTestCase): "X-Forwarded-For": "127.0.0.1", "X-Forwarded-Proto": "https", }, - "allow_redirects": True, + "allow_redirects": False, "timeout": 480, }, ), @@ -878,7 +878,7 @@ class TestRequestHandler(BaseHandlerTestCase): "X-Forwarded-For": "127.0.0.1", "X-Forwarded-Proto": "https", }, - "allow_redirects": True, + "allow_redirects": False, "timeout": 480, }, ) as request_mock, @@ -920,7 +920,7 @@ class TestRequestHandler(BaseHandlerTestCase): "X-Forwarded-For": "127.0.0.1", "X-Forwarded-Proto": "https", }, - "allow_redirects": True, + "allow_redirects": False, "timeout": 480, }, ), @@ -959,7 +959,7 @@ class TestRequestHandler(BaseHandlerTestCase): "X-Forwarded-For": "127.0.0.1", "X-Forwarded-Proto": "https", }, - "allow_redirects": True, + "allow_redirects": False, "timeout": 480, }, ),