All Products
Search
Document Center

Web Application Firewall:ModifyDefenseResourceXff

Last Updated:Apr 23, 2024

Modifies the cookie settings of a protected object and the method to identify the originating IP addresses of clients.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
XffStatusintegerYes

Specifies whether a Layer 7 proxy is deployed in front of WAF. Layer 7 proxies include Anti-DDoS Proxy and Alibaba Cloud CDN. Valid values:

  • 0: No Layer 7 proxies are deployed. This is the default value.
  • 1: A Layer 7 proxy is deployed.
0
InstanceIdstringYes

The ID of the Web Application Firewall (WAF) instance.

Note You can call the DescribeInstance operation to query the ID of the WAF instance.
waf_v2_public_cn-wwo3c****07
CustomHeadersarrayNo

The custom header fields.

Note The first IP address in the specified custom header field is used as the originating IP address of the client to prevent X-Forwarded-For forgery. If you specify multiple header fields, WAF reads the values of the header fields in sequence until the originating IP address is obtained. If the originating IP address cannot be obtained, the first IP address in the X-Forwarded-For header is used as the originating IP address of the client.
stringNo

The custom header field.

x-forwarded-for
ResourcestringYes

The name of the protected object.

alb-4pxu81fgagx3****mz-alb
AcwCookieStatusintegerNo

The status of the tracking cookie.

  • 0: disabled
  • 1: enabled. This is the default value.
0
AcwSecureStatusintegerNo

The status of the secure attribute of the tracking cookie.

  • 0: disabled. This is the default value.
  • 1: enabled.
0
AcwV3SecureStatusintegerNo

The status of the secure attribute of the slider CAPTCHA cookie.

  • 0: disabled. This is the default value.
  • 1: enabled.
0
ResourceManagerResourceGroupIdstringNo

The ID of the Alibaba Cloud resource group.

rg-acfm2kie2****wq
RegionIdstringNo

The region in which the WAF instance is deployed. Valid values:

  • cn-hangzhou: Chinese mainland.
  • ap-southeast-1: outside the Chinese mainland.
cn-hangzhou

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The request ID.

6C094583-9B3F-5BD8-8748-DC638E****BF

Examples

Sample success responses

JSONformat

{
  "RequestId": "6C094583-9B3F-5BD8-8748-DC638E****BF"
}

Error codes

For a list of error codes, visit the Service error codes.