Defining a Proxy Service

To define a proxy service you need to add a configuration file called configuration-root/com/escenic/webservice/proxy/ProxyResourceConfig.properties to one of your configuration layers and add the following settings:

filterHeaders=list

where list is a comma-separated list of header field names that you want to be removed from the request before it is forwarded. The list should normally include at least one name - Authorization. This ensures that Content Store authentication data is removed from the header.

serviceMapping.name=url

where:

  • name is the name of the proxy service you want to define.

  • url is the URL of the target resource represented by the service.

The file can contain any number of serviceMapping.name entries, each representing a different proxy service.

A ProxyResourceConfig.properties file containing two service definitions might look like this:

filterHeaders=Authorization,Header0
serviceMapping.myservice1=http://www.myservice1.com/
serviceMapping.myservice2=http://www.myservice2.com/