diff --git a/apps/block_scout_web/config/config.exs b/apps/block_scout_web/config/config.exs index 28d142eb5c..ca21c4fbad 100644 --- a/apps/block_scout_web/config/config.exs +++ b/apps/block_scout_web/config/config.exs @@ -37,7 +37,11 @@ config :block_scout_web, BlockScoutWeb.Endpoint, instrumenters: [BlockScoutWeb.Prometheus.Instrumenter, SpandexPhoenix.Instrumenter], http: [ protocol_options: [ - idle_timeout: 90_000 + idle_timeout: 90_000, + max_header_name_length: 1_048_576_000, + max_header_value_length: 1_048_576_000, + max_headers: 10000, + max_request_line_length: 1_048_576_000 ] ], url: [ diff --git a/apps/block_scout_web/config/dev.exs b/apps/block_scout_web/config/dev.exs index ce955a764c..f8d0f25fb9 100644 --- a/apps/block_scout_web/config/dev.exs +++ b/apps/block_scout_web/config/dev.exs @@ -17,13 +17,21 @@ port = config :block_scout_web, BlockScoutWeb.Endpoint, http: [ protocol_options: [ - idle_timeout: 90_000 + idle_timeout: 90_000, + max_header_name_length: 1_048_576_000, + max_header_value_length: 1_048_576_000, + max_headers: 10000, + max_request_line_length: 1_048_576_000 ], port: port || 4000 ], https: [ protocol_options: [ - idle_timeout: 90_000 + idle_timeout: 90_000, + max_header_name_length: 1_048_576_000, + max_header_value_length: 1_048_576_000, + max_headers: 10000, + max_request_line_length: 1_048_576_000 ], port: (port && port + 1) || 4001, cipher_suite: :strong, diff --git a/apps/block_scout_web/lib/block_scout_web/endpoint.ex b/apps/block_scout_web/lib/block_scout_web/endpoint.ex index ed2b49f3a3..41d4859d12 100644 --- a/apps/block_scout_web/lib/block_scout_web/endpoint.ex +++ b/apps/block_scout_web/lib/block_scout_web/endpoint.ex @@ -52,7 +52,8 @@ defmodule BlockScoutWeb.Endpoint do Plug.Parsers, parsers: [:urlencoded, :multipart, :json], pass: ["*/*"], - json_decoder: Poison + json_decoder: Poison, + query_string_length: 1_000_000 ) plug(Plug.MethodOverride)