[squid-users] How to replace message body

From: Ladislav Jech <archenroot_at_gmail.com>
Date: Mon, 12 Mar 2012 17:05:53 +0100

Hello,

we use Squid as reverse proxy which is used to connect to internal app
server from internet applications.
let "internal.domain.local" be internal name of server and default
configured front-end on application server level in internal network.
let "external.domain.local" be external name of server which is used
and defined in public DNS, which is used to access the internal server
from public internet.

Our internal application server runs Web services, each of this
service includes WSDL and XSD schemas. In these schemas there is used
internal server name as in this example internal.domain.local as
following:
WSDL includes address location>
<soap:address location="http://internal.domain.local:80/MyService"/>
WSDL but also imports other schemas
<xs:import namespace="http://internal.domain.local/MyService/Schema"
schemaLocation="http://internal.domain.local:80/MyService/Schema"/>

But when I access the service from internet, I like to change all URLs
in response body of the app server from internal.domain.local TO
external.domain.local. So everything is alright from the point of view
of the external user of web services.

Is squid able to do that? Is there any interface where I can get full
message body and apply some script on it (bash, perl, java, whatever)?

Thank you very much for some suggestion.

Best regards,

Ladislav Jech
Received on Mon Mar 12 2012 - 16:06:20 MDT

This archive was generated by hypermail 2.2.0 : Mon Mar 12 2012 - 12:00:04 MDT