Options
All
  • Public
  • Public/Protected
  • All
Menu

Namespace ControlAccessUsingHttpMethodsRule

An object that represents the action of returning a specified response code when the requested HTTP method is not in the list of allowed methods for the listener. The load balancer does not forward a disallowed request to the back end servers. The default response code is {@code 405 Method Not Allowed}.

If you set the response code to {@code 405} or leave it blank, the system adds an \"allow\" response header that contains a list of the allowed methods for the listener. If you set the response code to anything other than {@code 405} (or blank), the system does not add the \"allow\" response header with a list of allowed methods.

This rule applies only to HTTP listeners. No more than one {@code ControlAccessUsingHttpMethodsRule} object can be present in a given listener.

Properties

Const action

action: string = "CONTROL_ACCESS_USING_HTTP_METHODS"

allowedMethods

allowedMethods: Array<string>

The list of HTTP methods allowed for this listener.

By default, you can specify only the standard HTTP methods defined in the [HTTP Method Registry](http://www.iana.org/assignments/http-methods/http-methods.xhtml). You can also see a list of supported standard HTTP methods in the Load Balancing service documentation at [Managing Rule Sets](https://docs.cloud.oracle.com/Content/Balance/Tasks/managingrulesets.htm).

Your backend application must be able to handle the methods specified in this list.

The list of HTTP methods is extensible. If you need to configure custom HTTP methods, contact [My Oracle Support](http://support.oracle.com/) to remove the restriction for your tenancy.

Example: [\"GET\", \"PUT\", \"POST\", \"PROPFIND\"]

Optional statusCode

statusCode: undefined | number

The HTTP status code to return when the requested HTTP method is not in the list of allowed methods. The associated status line returned with the code is mapped from the standard HTTP specification. The default value is {@code 405 (Method Not Allowed)}.

Example: 403 Note: Numbers greater than Number.MAX_SAFE_INTEGER will result in rounding issues.

Methods

getDeserializedJsonObj

  • getDeserializedJsonObj(obj: Rule): object

getJsonObj

  • getJsonObj(obj: Rule): object