Skip to content
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

Configure Max Header Count #3305

Open
1 task done
Adam-Alj opened this issue Apr 4, 2025 · 3 comments
Open
1 task done

Configure Max Header Count #3305

Adam-Alj opened this issue Apr 4, 2025 · 3 comments

Comments

@Adam-Alj
Copy link

Adam-Alj commented Apr 4, 2025

  • I have looked for existing issues (including closed) about this

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.

@mladedav
Copy link
Collaborator

mladedav commented Apr 5, 2025

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 axum-server, I believe you can set things like these through that but it's another (3rd party) dependency.

@jplatte
Copy link
Member

jplatte commented Apr 5, 2025

I don't think there is a way to give people access to all the hyper settings at once without making hyper-util a public dependency.

Not sure what the best solution is for this. At my workplace we have also vendored axum::serve for some setting (I forget which one). It's probably not actually that bad to add a couple of extra settings as people ask for them?

@mladedav
Copy link
Collaborator

mladedav commented Apr 5, 2025

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 hyper-util public though. I don't feel like it's that unstable or anything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants