Welcome! Log In Create A New Profile

Advanced

Support dynamic client_max_body_size and new response_max_body_size

Jussi Maki
June 17, 2021 03:46PM
Hi,
have there been plans on adding support for dynamic client_max_body_size,
based on nginx-variable so it could be set for example in Lua-code per
request?
Also another nice feature to support dynamic size limitations would be a
response size body limit like response_max_body_size with support for
dynamic limits using a variable?

If this is not planned for any near future I could try to see how
challenging this kind of support would be to add. I guess for the
client_max_body_size variable resolution would be reasonably simple
following example from some other existing dynamic variables.

However, adding support for response_max_body_size would require a bit more
changes and also in the case of chunked-encoding a good question would be
what should be done if the content-size limit exceeds during the response,
should the connection be closed or what. Or perhaps this kind of
feature would only be supported for responses with Content-Length header?

Alternatively these limitations could be done by perhaps using some Lua
code and ngx.location.capture but I think it would be cleaner to have a
dynamic control variable for the limits.

br,
Jussi
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

Support dynamic client_max_body_size and new response_max_body_size

Jussi Maki 410 June 17, 2021 03:46PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 152
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready