Configure max http header size in Elixir Phoenix
If you store lots of data in cookies, you may eventually run up against the maximum header value length in Cowboy which by default is 4096.
While storing that much data in cookies is maybe not the best idea, there is a configuration setting that can help you work around this issue:
config :myapp, MyAppWeb.Endpoint,
http: [protocol_options: [max_request_line_length: 8192, max_header_value_length: 8192]]
There ya go! Now you can accept http header values up to 8192 bytes in length!
Tweet