I have configured an Apache 2.2 server as forward proxy using mod_proxy and mod_proxy_http
In my application that uses that proxy I need to modify http requests. (Requests means the request that goes to the origin server of the content. I dont want to manipulate the response that goes back to the client)
I am already sucessfully altering/adding cookies using RequestHeader from mod_headers.
I am also manipulating GET data using RewriteRule from mod_rewrite.
Now my question is whether there is a way to alter post data.
edit:
to clarify the intended usage and whether i am running a forward or a reverse proxy here is my server including modifications to urls and headers:
RewriteEngine on
ProxyRequests On
ProxyVia Off
<Proxy *>
Order deny,allow
Allow from all
AuthType Basic
AuthName "Password Required"
AuthUserFile /home/proxy/authfile
Require valid-user
</Proxy>
# lets have a sample rewrite rule
<ProxyMatch "http://sample-host.com/something.php\?param=value&u=(.+)&p=(.+)&format=xml">
RewriteEngine on
RewriteRule . http://sample-host.com/something.php?param=value&u=secret&p=evenmoresecret&format=xml [P]
</ProxyMatch>
# lets modify some headers
<ProxyMatch "http://example\.net/somepath/(.+)/someotherpath">
RequestHeader set Cookie "auth=secret;login=&id=secret"
# do not disclose cookie to the client
Header unset "Set-Cookie"
</ProxyMatch>
in a similar way i want to edit post data!