Skip to content
This repository has been archived by the owner on May 24, 2023. It is now read-only.

client_max_body_size uses the default 1M value #24

Open
llegolas opened this issue May 23, 2019 · 1 comment
Open

client_max_body_size uses the default 1M value #24

llegolas opened this issue May 23, 2019 · 1 comment
Labels

Comments

@llegolas
Copy link

Is your feature request related to a problem? Please describe.
We use nginx openshift router to expose grpc services and from time to time we got errors like:

<title>413 Request Entity Too Large</title>

413 Request Entity Too Large


nginx/1.15.6

Describe the solution you'd like
add client_max_body_size to the golang template. It can get its value from env. var or define it static but bigger than 1M it has by default.
I can submit patch for that but I wonder in which context it is best to put it http or location?
If it is the latter perhaps it is best the value to come from annotation.

Describe alternatives you've considered
modify the golang template and hardcode it in the http context which will work for me I suppose

@pleshakov
Copy link
Collaborator

@llegolas
It makes sense to put that directive into the location context. it makes sense to be able to configure the directive both through the env variable and annotation.

we'd be happy to review your PR!

Please note that as a workaround, you can also try the location snippets annotation unsafe.nginx.router.openshift.io/location-snippets. See https://github.com/nginxinc/nginx-openshift-router/blob/master/docs/configuration.md#annotations. For example:
unsafe.nginx.router.openshift.io/location-snippets: "client_max_body_size 3m;"

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

No branches or pull requests

2 participants