Querying the Source IP Header

Function Description

This API is used to query the source IP header.

URI

  • URI format

    GET /v1/{project_id}/waf/map/sipheader?lang={lang}

  • Parameter description

    Table 1 Path parameters

    Parameter

    Mandatory

    Type

    Description

    project_id

    Yes

    String

    Specifies the project ID.

    lang

    No

    String

    Specifies the language configuration. The options are zh-cn and en-us. The default value is en-us.

Request

Request parameters

None

Response

Response parameters

Table 2 Parameter description

Parameter

Type

Description

sipheadermap

Table 3

Specifies the list of source IP headers.

locale

Table 4

Specifies additional information.

Table 3 sipheadermap

Parameter

Type

Description

default

Array

Specifies the default HTTP request header to identify the real source IP address.

cloudflare

Array

Specifies the HTTP request header used by Cloudflare to identify the real source IP address.

akamai

Array

Specifies the HTTP request header used by Akamai to identify the real source IP address.

custom

Array

Specifies the custom HTTP request header to identify the real source IP address.

Table 4 locale

Parameter

Type

Description

default

String

The value is Default.

cloudflare

String

The value is CloudFlare.

akamai

String

The value is Akamai.

custom

String

The value is Custom.

Example

Response example

{
  "sipheadermap": {
      "default": ["X-Forwarded-For"],
      "cloudflare": ["CF-Connecting-IP", "X-Forwarded-For"],
      "akamai": ["True-Client-IP"],
      "custom": []
  },
  "locale": {
       "default": "Default",
       "cloudflare": "CloudFlare",
       "akamai": "Akamai",
       "custom": "Custom"
   }
}

Status Code

Table 5 describes the normal status code returned by the API.

Table 5 Status code

Status Code

Description

Meaning

200

OK

The request has succeeded.

For details about error status codes, see Status Codes.