+

Search Tips   |   Advanced Search

Policy settings - outbound HTTP connections

Each policy setting defines an access policy for a URL pattern. We specify the pattern using the url attribute. A url attribute can be either a URL, or the wildcard character, or URL part that ends with the wildcard character "*".

Example url attribute values...

  • http://localhost/index.html
  • *http://www.ibm.com/developerWorks/*.

For each incoming request, the proxy applies the policy with the best URL match. If the proxy finds a policy, it applies this policy to the outbound connection. If the proxy finds no matching policy, the proxy rejects the request. Mappings can optionally declare policy setting representing mapping-specific access policies. To enable Basic Authentication for a policy, we can set the attribute basic-auth-support to true.

A policy setting can have a name attribute that identifies this policy for administrative tasks. If this attribute is not set, the portal sets a unique administrative name for it. The administrative name must be unique for all policies with the same parent mapping setting or parent proxy-rules setting.

A policy setting can have the subsettings shown in the following list. Specify the subsettings in the same order in the configuration file proxy-config.xml as in the list:

    actions
    Mandatory. List of HTTP methods used to access resources in the target domain. These methods are GET, HEAD, POST, PUT, and DELETE. The proxy denies requests using HTTP methods not on this list. Specify each HTTP method using a separate method setting.

    headers
    Optional. List of header names that we want the proxy to forward to the target domain. The header names can include wildcard characters. If we specify no header names for the policy, the proxy by default forwards headers that match the following name expressions: Cache-Control, Pragma, User-Agent, Accept*, and Content*. Specify each header name using a separate header setting.

    The value Cookies is not allowed. Instead, use the cookies setting to specify the cookie forwarding behavior for the policy.

    mime-types
    Optional. List of accepted mime types. The mime types refer to the response the proxy receives from the target server. If we specify at least one mime type, the proxy accepts only responses with a Content-Type response header that matches one of the specified mime types. If we specify no mime type, the proxy accepts all responses. Specify each mime type using a separate mime-type setting. Servers might append the character encoding to the mime type. Therefore, it can be useful to use wildcard characters when specified mime types. For example, if specified text/html*, the proxy also accepts responses with the Content-Type text/html; charset=utf-8.

    cookies
    Optional. List of cookie names that identify the cookies that we want the proxy to forward to the target domain. To forward cookies, the proxy filters the value of the cookie header according to the defined cookie names. If we specify no cookie names, the proxy forwards no cookies. Specify each cookie name using a separate cookie setting.

    users
    Optional. If we specify AllAuthenticatedUsers, the proxy verifies the request was sent by an authenticated user. Otherwise, the proxy rejects the request. Other user groups are currently not supported.

    Cookie-rules
    Optional. List of cookie rules containing handling rules for cookies set by the remote system in connections that apply to this rule.


Parent Outbound HTTP connection configuration script