From b8986423735fcff3eb35060ed6a88049515fc2ea Mon Sep 17 00:00:00 2001 From: Vinicius Brasil Date: Wed, 19 Oct 2022 09:41:05 -0300 Subject: [PATCH] Double maximum header length (#2353) This commit makes the permitted header length more permissive, 8,192 bytes, doubling the Phoenix default. Related to https://github.com/4lejandrito/next-plausible/issues/67 --- config/runtime.exs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/config/runtime.exs b/config/runtime.exs index d5c48af6b..00002ac7b 100644 --- a/config/runtime.exs +++ b/config/runtime.exs @@ -212,7 +212,12 @@ config :plausible, :selfhost, config :plausible, PlausibleWeb.Endpoint, url: [scheme: base_url.scheme, host: base_url.host, path: base_url.path, port: base_url.port], - http: [port: port, ip: listen_ip, transport_options: [max_connections: :infinity]], + http: [ + port: port, + ip: listen_ip, + transport_options: [max_connections: :infinity], + protocol_options: [max_request_line_length: 8192, max_header_value_length: 8192] + ], secret_key_base: secret_key_base maybe_ipv6 = if System.get_env("ECTO_IPV6"), do: [:inet6], else: []