I'm using Apache ProxyPass to pass some requests from my server (1) to another (2). This works fine for most requests, but when server 2 processes a POST request and sends a redirect header, this is passed right through to the client, who then applies the redirect on server 1 and thus gets a 404.
So what I'd like is that server 1 (the server with the ProxyPass) follows redirects on server 2 and passes the final page back to the client.
I'm sure this must be a very common scenario, but I can't seem to find the solution. I'm imagining something like a "follow_redirects" flag, similar as you would apply to a curl client, but I haven't found anything like that. Maybe what I'm trying to do isn't the purpose of ProxyPass?
Could someone point me in the right direction here?
Thanks, Chris