Class 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 405 Method Not Allowed
.
If you set the response code to 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 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 ControlAccessUsingHttpMethodsRule
object can be present in
a given listener.
Inherited Members
Namespace: Oci.LoadbalancerService.Models
Assembly: OCI.DotNetSDK.Loadbalancer.dll
Syntax
public class ControlAccessUsingHttpMethodsRule : Rule
Properties
AllowedMethods
Declaration
[Required(ErrorMessage = "AllowedMethods is required.")]
[JsonProperty(PropertyName = "allowedMethods")]
public List<string> AllowedMethods { get; set; }
Property Value
Type | Description |
---|---|
List<string> | The list of HTTP methods allowed for this listener.
|
Remarks
Required
StatusCode
Declaration
[JsonProperty(PropertyName = "statusCode")]
public int? StatusCode { get; set; }
Property Value
Type | Description |
---|---|
int? | 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 |