What is the difference between request size limiting with plugin or conf file?

As I checked documentation, there is a plugin for to do that.

and you can do it by changing client_max_body_size line in nginx-kong-custom.conf file.
So, what is the difference ?

nginx’s documentation of the client_max_body_size attribute - Module ngx_http_core_module

The functionality of the two configurations is similar (though necessarily the same, as Kong can return different status codes), but you can only apply the nginx configuration, unless you try really hard, globally, whereas you can apply different request-size-limiting configurations for any combination of global, consumer, route or service.

1 Like