So the idea is interesting, but I think adding something like this onto Nginx could lead to problems in the future.<p>For what you're trying to do, I feel like implementing your reverse proxy in Go may prove to be less prone to errors. Go has ReverseProxy stuff already built in: <a href="http://golang.org/pkg/net/http/httputil/#ReverseProxy" rel="nofollow">http://golang.org/pkg/net/http/httputil/#ReverseProxy</a><p>Go already has a pretty strong following doing near exactly what you are doing here with Nginx + Lua. But that would require learning a new language and screwing with infrastructure, which always is a giant pain.