跳到主要内容
版本:latest

get_security_headers

获取指定网站的 HTTP 安全响应头配置状态。

  • 路由POST /site
  • actionget_security_headers

输入参数

参数名称必选类型描述
actionString固定值 get_security_headers
site_nameString网站域名

输出参数

参数名称类型描述
x_xss_protectionBooleanXSS 保护开关
x_content_type_optionsBooleanContent-Type 选项
referrer_policyBooleanReferrer 策略
content_security_policyBooleanCSP 策略
permissions_policyBoolean权限策略

示例

请求

POST /site HTTP/1.1
Host: 192.168.168.213:8888
Content-Type: application/x-www-form-urlencoded

action=get_security_headers&site_name=testapi.bt.local

响应

{"x_xss_protection": false, "x_content_type_options": false, "referrer_policy": false, "content_security_policy": false, "permissions_policy": false}