The addition before sub

Witold Filipczyk witekfl at gazeta.pl
Thu Jun 6 13:41:53 UTC 2013


Hello,
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  
the page.
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  
addition filter?



More information about the nginx-devel mailing list