+

Search Tips   |   Advanced Search

Access policies - Ajax proxy


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, we can set the attribute basic-auth-support to true, if the referenced XML schema is Version 1.1 or a later version.

A policy element can have the following sub-elements. Specify them in the same order in the configuration file proxy-config.xml as the following:

actions Mandatory. Define the list of HTTP methods used to access resources in the target domain. These are 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. Define the list of header names you want the proxy to forward to the target domain. The header names an include wildcard characters. If we 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*, and Content*. Specify each header name 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.

mime-types Optional. Specify 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 we specify text/html*, the proxy also accepts responses with Content-Type: text/html; charset=utf-8.
cookies Optional. Define a list of cookie names that identify the cookies you 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 no cookie names are specified, the proxy forwards no cookies. Specify each cookie name using a separate cookie element.
users Optional. If we 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: The proxy-config.xml file
Related:
Context path mappings
IP filtering
General configuration parameters
Examples of AJAX proxy configurations