I want to inject something before </body> and before </head>, but even if
there is no </body>.
So used add_after_body /after_body;
/after_body returns the text </body>, so there is at least one </body> in
I wanted sub_filter to replace </body> to SOMETHING</body>, but the
sub_filter is run before the addition_filter.
Changing the order in modules doesn't help, because the sub_filter doesn't
replace the text from subrequests.
I have a few questions:
How to replace two different substrings using sub_filter or something else?
How to force sub_filter to replace text, even if it comes from the
I'm using nginx as a front-end on file uploader. It gets PUT request from
client and then proxy_pass it to custom uploader. The problem is nginx is
buffering whole request body (which may be very large - up to several
gigabytes) and only after that request is passed to my backend.
Is there any ways to force nginx to proxy request immediately without