Ajax proxy - Access policies

 

+

Search Tips   |   Advanced Search

 

Each policy element defines an access policy for a given URL pattern. The pattern is specified by means of the url attribute.

For each incoming request, the proxy applies the policy with the best URL match. If no matching policy is found, the proxy rejects the request. If a policy is found, the subelements of the policy element are applied to check whether or not the request can be accepted. Mapping elements can optionally declare policy elements that represent mapping specific access policies.

To enable Basic Authentication for a policy, you can set the attribute basic-auth-support to true. A policy element can have the following subelements:

actions

Mandatory. List of HTTP methods that can be used to access resources in the target domain.

  • GET
  • HEAD
  • POST
  • PUT
  • DELETE

The proxy denies requests that use HTTP methods that are not on this list. Specify each HTTP method using a separate method element.

headers

Optional. List of header names the proxy forwards to the target domain.

The header names an include wildcard characters. If you specify no header names for the policy, the proxy will by default forward headers that match the following name expressions:

  • Cache-Control
  • Pragma
  • User-Agent
  • Accept*
  • Content*

Specify each header name by using a separate header element.

The value Cookies is not allowed. Use the cookies element to specify the cookie forwarding behavior for the policy instead.

cookies

Optional. Defines a list of cookie names that identify the cookies that you want the proxy to forward to the target domain. In order to forward cookies, the proxy filters the value of the cookie header according to the defined cookie names. If no cookie names are specified, the proxy forwards no cookies. Specify each cookie name by using a separate cookie element.

mime-types

Optional. Specifies the list of accepted mime types. The mime types refer to the response that the proxy receives from the target server. If there is at least one mime type specified, the proxy accepts only responses with a Content-Type response header that matches one of the specified mime types. If no mime type is specified, the proxy accepts all responses. Each mime type must be specified using a separate mime-type element. Using wildcard characters when specifying mime types can be useful, as servers might append the character encoding to the mime type.

For example, if you specify text/html*, the proxy also accepts responses with...

    Content-Type: text/html; charset=utf-8

users

Optional. If you specify AllAuthenticatedUsers, the proxy verifies that the request was sent by an authenticated user. Otherwise the proxy rejects the request. Other user groups are not supported at this time.


Parent topic:

The proxy-config.xml file


Related reference


Context path mappings
IP filtering
General configuration parameters
Examples of AJAX proxy configurations