Access policies
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 sub-elements. Specify them in the same order in the configuration file proxy-config.xml as given below:
actionsThis element is mandatory. Use it to define the list of HTTP methods that can be 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 by using a separate method element.
headersThis element is optional. Use it to define the list of header names that you want the proxy to forward 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*, and 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.
mime-typesThis element is optional. Use it to 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 you specify text/html*, the proxy also accepts responses with Content-Type: text/html; charset=utf-8.
This element is optional. Use it to define 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.
usersThis element is 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
The proxy-config.xml file
Context path mappings
IP filtering
General configuration parameters
Examples of AJAX proxy configurations