Change the maximum size of requests
How Controlling Request Sizes
Definition
The req size is the maximum value of the payload body size associated with the request.
Default size
In our platform the default size is 1m
client_max_body_size 1m;
Change the default size
Through our extension you can easily change this value by changing the value.
For example:
client_max_body_size 10m;
If you put 0 value any size is accepted
How can you change the default size for all the request?
Action:
Go to Section: api-gateway/request-size.conf
To change the value just enter the following string and choose the value you want to set:
client_max_body_size 10m;
How can you change only the backoffice request size?
Action:
Go to Section: api-gateway/backoffice-root-location-extension.conf
To change the value just enter the following string and choose the value you want to set:
client_max_body_size 16k;
How can you change a specific root?
Action:
Go to Section: api-gateway/root-location-extension.conf
Here you fill find an empty file.
To change the value just enter the following string and choose the value you want to set:
location ~ "^/example" {
client_max_body_size 1m;
proxy_pass http://$proxy_name$proxy_url;
}
In this case you change the req size for all the locations starting with /example path.
Since the proxy_pass
variable is not inherited inside the location block, you must define it again. In case of a change in proxy_name
or proxy_url
variables names this configuration will not work.