我正在尝试使用Curl访问远程url。当执行curl时,我得到了这个错误
<html style="height:100%">
<head><META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<meta name="format-detection" content="telephone=no">
<meta name="viewport" content="initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
</head>
<body style="margin:0px;height:100%">
<iframe src="/_Incapsula_Resource ?CWUDNSAI=24&xinfo=4-13149215-0 0NNN RT(1490255810449 195) q(0 -1 -1 -1) r(0 -1) B12(4,315,0) U18&incident_id=439000400034489515-104043319326605956&edet=12&cinfo=04000000" frameborder=0 width="100%" height="100 %" marginheight="0px" marginwidth="0px">
Request unsuccessful. Incapsula incident ID: 439000400034489515-104043319326605956
</iframe>
</body>
</html>发布于 2017-04-25 17:11:12
当然,因为curl的行为看起来像机器人,所以Incapsula会拒绝你的请求。如果您是该站点的管理员,您可以尝试使用-H选项将特定的标题添加到curl中,并将该标题列入内容式控制台中的白名单。
只需转到网站控制台,在安全设置中,您可以找到包含以下字段的白名单选项:
▪ IP - Single IP (1.2.3.4), Range (1.2.3.4 - 1.3.3.4), Subnet (1.2.3.4/16).
▪ URL - exact URL (/admin); URL which contains all sub-folders (/exmaple/*). Note that it is recommended to seperate between wildcard exceptions and exceptions for exact paths.
▪ Client app ID - Each of the known client app IDs by Incapsula (Such as Qualys Scanner).
▪ Country - Specific country or continent.
▪ User-Agent - Each of the known user agents, such Chrome, FireFox, etc. Wildcard (*) can NOT be set here.
▪ HTTP Parameter - Specific HTTP parameter (not a value). Wildcard (*) can NOT be set here.发布于 2017-05-10 00:32:49
https://stackoverflow.com/questions/42970538
复制相似问题