I quickly exposed the value used for the client_max_body_size directive in the http context as a variable in 7d1eee4
There is a lot of directives in the http context that one may want to change. But I'm not sure the generalization of the pattern using in 7d1eee4 would be produce a usable/maintainable solution.