teamhephy / router

MIT License
4 stars 10 forks source link

feat(router): Add ability to set MaxHeaderSize and MaxFieldSize globally #37

Closed tolstenko closed 5 years ago

tolstenko commented 5 years ago

I added the ability to set the maximum size of headers and fields. It might be useful for people using large bearer tokens ie. keycloak.

In order to avoid problems for people like me, I already increased the size of the headers for my "reasonable" size. I can set back to defaults if you guys prefer it.

Here are the default variables: http://nginx.org/en/docs/http/ngx_http_v2_module.html

Cryptophobia commented 5 years ago

I added the ability to set the maximum size of headers and fields. It might be useful for people using large bearer tokens ie. keycloak.

Great work @tolstenko and great contribution. :100:

In order to avoid problems for people like me, I already increased the size of the headers for my "reasonable" size. I can set back to defaults if you guys prefer it.

Here are the default variables: http://nginx.org/en/docs/http/ngx_http_v2_module.html

Yes, let's have the default values be the same as the nginx defaults whenever possible (16k http2_max_header_size and 4k http2_max_field_size). If we need to increase these values we can set them manually, but lets try to keep close to nginx defaults for most users. What do you think? Just that change and ready for merge. :+1: