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
¶ 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
Parameter | Type | Description |
---|---|---|
sipheadermap | Specifies the list of source IP headers. | |
locale | Specifies additional information. |
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. |
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.
Status Code | Description | Meaning |
---|---|---|
200 | OK | The request has succeeded. |
For details about error status codes, see Status Codes.