views:

942

answers:

0

I'm doing some researching on switching from Apache to Nginx as a reverse proxy in front of a Grails application on the backend. I'm playing around with some URL rewriting and have run into an issue with the response being sent back from my back end. I can handle the location header rewrite but I'm wondering what the best way to process the actually content is for link and such.

Is nginx_substitutions_filter the preferred method or is there another module that folks use to do content replacement in the response body?

I've thought about creating a Grails plugin to handle rendering the correct content based on additional request headers but now I'm thinking that would be best handled outside the application to allow for the most flexibility and loose coupling.

Are there any articles about best practices for doing URL rewriting/response post processing for reverse proxy scenarios?