Is there anyway to filter content and return a 403 in nginx?

baalchina baalchina at
Sat Sep 9 13:28:50 UTC 2023

Hi, I had a nginx working as reverse proxy, and all my backend are http

I want to filter the content, for example, if the content has a work like
'virus', then nginx return a 403.
When I looked the ngx_http_sub_module, seems it can replace the content,
such as replace 'virus' to 'health', but can not return a 403?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list