I was in a situation where I needed to implement a mail routing policy: Outgoing email from a specific domain gets routed through a relay (eg. Amazon SES) and all other goes directly.
Today we are going to compile nginx web server with naxsi WAF (Web Application Firewall), Google PageSpeed modules and HTTP/2 support.
Using nginx as a reverse proxy is very easy to do and there are many guides on the internet on this topic. However there’s not a lot of content regarding modifying proxied data on-the-fly. Here’s how to do it