From 4195350fcd1dcd0d5988b01cb16490277f334703 Mon Sep 17 00:00:00 2001 From: polyaxon-ci Date: Tue, 22 Oct 2024 11:28:56 +0200 Subject: [PATCH] Improve handling of large query params --- haupt/haupt/proxies/schemas/buffering.py | 5 +++++ .../tests/test_proxies/test_api/test_base.py | 10 ++++++++++ .../test_proxies/test_gateway/test_base.py | 20 +++++++++++++++++++ .../test_proxies/test_streams/test_base.py | 15 ++++++++++++++ 4 files changed, 50 insertions(+) diff --git a/haupt/haupt/proxies/schemas/buffering.py b/haupt/haupt/proxies/schemas/buffering.py index 785bc527a2..439f3a797f 100644 --- a/haupt/haupt/proxies/schemas/buffering.py +++ b/haupt/haupt/proxies/schemas/buffering.py @@ -4,6 +4,11 @@ client_max_body_size 0; client_body_buffer_size 50m; client_body_in_file_only clean; +large_client_header_buffers 8 1m; +client_header_buffer_size 1m; +uwsgi_buffer_size 1m; +uwsgi_buffers 8 1m; +uwsgi_busy_buffers_size 2m; sendfile on; """ diff --git a/haupt/tests/test_proxies/test_api/test_base.py b/haupt/tests/test_proxies/test_api/test_base.py index b587a9fbe7..e9e4b9952b 100644 --- a/haupt/tests/test_proxies/test_api/test_base.py +++ b/haupt/tests/test_proxies/test_api/test_base.py @@ -29,6 +29,11 @@ def test_api_base_config(self): client_max_body_size 0; client_body_buffer_size 50m; client_body_in_file_only clean; +large_client_header_buffers 8 1m; +client_header_buffer_size 1m; +uwsgi_buffer_size 1m; +uwsgi_buffers 8 1m; +uwsgi_busy_buffers_size 2m; sendfile on; @@ -160,6 +165,11 @@ def test_api_base_config_with_cdn_and_admin(self): client_max_body_size 0; client_body_buffer_size 50m; client_body_in_file_only clean; +large_client_header_buffers 8 1m; +client_header_buffer_size 1m; +uwsgi_buffer_size 1m; +uwsgi_buffers 8 1m; +uwsgi_busy_buffers_size 2m; sendfile on; diff --git a/haupt/tests/test_proxies/test_gateway/test_base.py b/haupt/tests/test_proxies/test_gateway/test_base.py index b0deac7c54..49459a09f4 100644 --- a/haupt/tests/test_proxies/test_gateway/test_base.py +++ b/haupt/tests/test_proxies/test_gateway/test_base.py @@ -29,6 +29,11 @@ def test_gateway_base_config(self): client_max_body_size 0; client_body_buffer_size 50m; client_body_in_file_only clean; +large_client_header_buffers 8 1m; +client_header_buffer_size 1m; +uwsgi_buffer_size 1m; +uwsgi_buffers 8 1m; +uwsgi_busy_buffers_size 2m; sendfile on; @@ -277,6 +282,11 @@ def test_gateway_base_config_with_auth_and_dns(self): client_max_body_size 0; client_body_buffer_size 50m; client_body_in_file_only clean; +large_client_header_buffers 8 1m; +client_header_buffer_size 1m; +uwsgi_buffer_size 1m; +uwsgi_buffers 8 1m; +uwsgi_busy_buffers_size 2m; sendfile on; @@ -581,6 +591,11 @@ def test_platform_base_config(self): client_max_body_size 0; client_body_buffer_size 50m; client_body_in_file_only clean; +large_client_header_buffers 8 1m; +client_header_buffer_size 1m; +uwsgi_buffer_size 1m; +uwsgi_buffers 8 1m; +uwsgi_busy_buffers_size 2m; sendfile on; @@ -890,6 +905,11 @@ def test_platform_base_config_with_auth_and_dns(self): client_max_body_size 0; client_body_buffer_size 50m; client_body_in_file_only clean; +large_client_header_buffers 8 1m; +client_header_buffer_size 1m; +uwsgi_buffer_size 1m; +uwsgi_buffers 8 1m; +uwsgi_busy_buffers_size 2m; sendfile on; diff --git a/haupt/tests/test_proxies/test_streams/test_base.py b/haupt/tests/test_proxies/test_streams/test_base.py index ed6b4db00f..426d96d186 100644 --- a/haupt/tests/test_proxies/test_streams/test_base.py +++ b/haupt/tests/test_proxies/test_streams/test_base.py @@ -29,6 +29,11 @@ def test_streams_base_config(self): client_max_body_size 0; client_body_buffer_size 50m; client_body_in_file_only clean; +large_client_header_buffers 8 1m; +client_header_buffer_size 1m; +uwsgi_buffer_size 1m; +uwsgi_buffers 8 1m; +uwsgi_busy_buffers_size 2m; sendfile on; @@ -132,6 +137,11 @@ def test_streams_base_config_with_gateway(self): client_max_body_size 0; client_body_buffer_size 50m; client_body_in_file_only clean; +large_client_header_buffers 8 1m; +client_header_buffer_size 1m; +uwsgi_buffer_size 1m; +uwsgi_buffers 8 1m; +uwsgi_busy_buffers_size 2m; sendfile on; @@ -437,6 +447,11 @@ def test_streams_base_config_with_gateway_dns_auth(self): client_max_body_size 0; client_body_buffer_size 50m; client_body_in_file_only clean; +large_client_header_buffers 8 1m; +client_header_buffer_size 1m; +uwsgi_buffer_size 1m; +uwsgi_buffers 8 1m; +uwsgi_busy_buffers_size 2m; sendfile on;