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!

link|improve this question

mod_substitute logs promising but it only acts on response bodys! – Joe Hopfgartner Jun 5 '11 at 23:35
what makes you think i have a reverse proxy? to clarify i added my server config to the questino! – Joe Hopfgartner Jun 6 '11 at 1:45
right now i have a workaround in place that ACTUALLY uses a reverse proxy. but i would like to get rid of that. – Joe Hopfgartner Jun 6 '11 at 1:46
@Joe - I realised my mistake and deleted my comment - I thought I'd got to it before you'd seen it ;) – Mark Henderson Jun 6 '11 at 4:24
oh okay now you officially trolled me :D – Joe Hopfgartner Jun 6 '11 at 15:57
show 1 more comment
feedback

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
or
required, but never shown

Browse other questions tagged or ask your own question.