nginx-openshift-router icon indicating copy to clipboard operation
nginx-openshift-router copied to clipboard

client_max_body_size uses the default 1M value

Open llegolas opened this issue 6 years ago • 1 comments

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:

413 Request Entity Too Large

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

llegolas avatar May 23 '19 13:05 llegolas

@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;"

pleshakov avatar May 23 '19 17:05 pleshakov