-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Configure Max Header Count #3305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
There are more hyper configurations that should be available so I don't think we should go with exposing this one option but rather find a way to let users have more control over the underlying hyper connections. You might also want to look at |
I don't think there is a way to give people access to all the hyper settings at once without making Not sure what the best solution is for this. At my workplace we have also vendored |
I worry it'll become a whack-a-mole with different configs to be exposed. But sure, we can expose some settings. I don't see a problem with making |
Great to hear that there's interest and openness to this. We'll work on getting a PR up. |
Thanks everyone for the discussion. In the meantime, while waiting for this feature to potentially be included in Axum core, I’ve used the axum-server crate to successfully override the default Hyper header limit. It gives access to hyper::server::conn::Http settings like http1_max_headers. Here's a minimal example of how to raise the limit to 512: axum_server::bind(addr) This could serve as a temporary solution for anyone needing to bypass the default 100 header limit. That said, I’d love to see a clean abstraction for this within Axum itself, especially since header limits and other Hyper-level configs are common in enterprise setups. Happy to help draft a potential API design if needed! |
Feature Request
Motivation
Working on a large enterprise system and using axum for one of our services.
The system, for better or worse, passes around a large number of headers, over the default number of 100 headers as declared in hyper.
The hyper library exposes a function to override this default value, however this is not exposed through axum.
Proposal
Expose this configuration through axum configuration settings.
Would you be receptive to a pull request to expose this as a config option?
Alternatives
We maintain a patched fork to set this in
serve.rs
, but would rather have this configurability present in the unpatched library.We considered using plain hyper, which is suggested in the axum docs, however such a relatively innocuous http-server configuration seems valid for inclusion in axum configuration.
The text was updated successfully, but these errors were encountered: