Reputation: 4803
My Phoenix app has started giving 431 error responses to some page requests when the user's browser has accumulated too many cookies. (Our site is one subdomain of a very large domain, and many cookies are set globally on the top-level domain.) How can I configure my app to allow longer headers to avoid this error?
Upvotes: 1
Views: 1105
Reputation: 4803
The Phoenix webserver adapter (by default Phoenix.Endpoint.Cowboy2Adapter
) allows you to adjust the default max header size etc. For example I ended up using this config:
config :my_app, MyAppWeb.Endpoint,
http: [
port: System.get_env("PORT") || "80",
protocol_options: [max_header_value_length: 8192]
],
...
For full options & more description, see:
Upvotes: 10