The proxy-config.xml file

 

+

Search Tips   |   Advanced Search

 

The AJAX Proxy configuration is specified by using an XML file called named proxy-config.xml. The latest version of the XML schema of this file consists of the following main elements. They must all be children elements of the proxy rules root element. For more details about the XML schema refer to the end of the section about the AJAX proxy.

Here is an example...

./config/cells/cell1/applications/AJAX Proxy Configuration.ear/deployments/AJAX Proxy Configuration/wp.proxy.config.war/WEB-INF/proxy-config.xml

<?xml version="1.0" encoding="UTF-8"?>

<proxy-rules xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
             xmlns:proxy="http://www.ibm.com/xmlns/prod/sw/ajax/proxy-config/1.0">

<proxy:mapping contextpath="/proxy" url="*"/>

  <proxy:mapping contextpath="/myproxy" url="*"/>
  <proxy:mapping contextpath="/common_proxy" url="*"/>

      <proxy:policy url="http://www.ibm.com/*" acf="none">
        <proxy:actions>
          <proxy:method>GET</proxy:method>
        </proxy:actions>
      </proxy:policy>

      <proxy:policy url="http://www-03.ibm.com/*" acf="none">
        <proxy:actions>
          <proxy:method>GET</proxy:method>
        </proxy:actions>
      </proxy:policy>

      <proxy:policy url="http://www.redbooks.ibm.com/*" acf="none">
        <proxy:actions>
          <proxy:method>GET</proxy:method>
        </proxy:actions>
      </proxy:policy>

      <proxy:policy url="{$default_ltpa_policy}" acf="none">
        <proxy:actions>
          <proxy:method>GET</proxy:method>
          <proxy:method>HEAD</proxy:method>
        </proxy:actions>

        <proxy:cookies>
          <proxy:cookie>LtpaToken</proxy:cookie>
          <proxy:cookie>LtpaToken2</proxy:cookie>
        </proxy:cookies>

      </proxy:policy>

      <proxy:policy url="{$default_policy}" acf="none">

        <proxy:actions>
          <proxy:method>GET</proxy:method>
          <proxy:method>HEAD</proxy:method>
         </proxy:actions>
      </proxy:policy>

      <proxy:policy url="{$federated_documents_policy}" acf="none" basic-auth-support="true">
        <proxy:actions>
          <proxy:method>GET</proxy:method>
          <proxy:method>HEAD</proxy:method>
          <proxy:method>POST</proxy:method>
          <proxy:method>DELETE</proxy:method>
          <proxy:method>PUT</proxy:method>
        </proxy:actions>

        <proxy:cookies>
          <proxy:cookie>LtpaToken</proxy:cookie>
          <proxy:cookie>LtpaToken2</proxy:cookie>
        </proxy:cookies>

        <proxy:headers>
          <proxy:header>User-Agent</proxy:header>
          <proxy:header>Accept*</proxy:header>
          <proxy:header>Content*</proxy:header>
          <proxy:header>Authorization*</proxy:header>
          <proxy:header>X-Method-Override</proxy:header>
          <proxy:header>Set-Cookie</proxy:header>
          <proxy:header>If-Modified-Since</proxy:header>
          <proxy:header>If-None-Match</proxy:header>
          <proxy:header>X-Server</proxy:header>
          <proxy:header>X-Update-Nonce</proxy:header>
          <proxy:header>X-Requested-With</proxy:header>
          <proxy:header>com.ibm.lotus.openajax.virtualhost</proxy:header>
          <proxy:header>com.ibm.lotus.openajax.virtualport</proxy:header>
        </proxy:headers>

        <proxy:meta-data>
          <proxy:name>xhr-authentication-support</proxy:name>
          <proxy:value>true</proxy:value>
        </proxy:meta-data>
      </proxy:policy>

      <proxy:meta-data>
        <proxy:name>socket-timeout</proxy:name>
        <proxy:value>10000</proxy:value>
      </proxy:meta-data>

      <proxy:meta-data>
        <proxy:name>retries</proxy:name>
        <proxy:value>2</proxy:value>
      </proxy:meta-data>

      <proxy:meta-data>
        <proxy:name>max-connections-per-host</proxy:name>
        <proxy:value>5</proxy:value>
      </proxy:meta-data>

      <proxy:meta-data>
        <proxy:name>max-total-connections</proxy:name>
        <proxy:value>100</proxy:value>
      </proxy:meta-data>

</proxy-rules>

policy

The policy element is the most important element in the proxy configuration. Use the policy element to define an access policy for a specific URL pattern. A proxy configuration can contain multiple policy definitions. If no policy is specified at all, all incoming requests are denied. For more details about policies, refer to the section about access policies among the links below.

mapping

Use the mapping element to map incoming requests to a target URL, based on their context path. Therefore each mapping element needs to specify a contextpath attribute and optionally a url attribute. Mapping elements can optionally declare policy elements that represent mapping specific access policies. For more details about how to use mapping elements refer to the subsection about context path mappings.

ipfilter

Use ipfilter elements to define one or several IP filtering rules. You can use IP filtering rules to either grant or deny access to a particular IP address or to a set of addresses. For more details about IP filtering rules, refer to the subsection about IP filtering.

meta-data

Use the meta-data to specify general configuration properties of the proxy, for example. HTTP-related parameters. Each meta-data element must have a name subelement and a value subelement.

To get a list of configuration parameters that are available in the portal, refer to the section about general configuration parameters.


Parent topic:

AJAX proxy configuration