get_security_headers
获取指定网站的 HTTP 安全响应头配置状态。
- 路由:
POST /site - action:
get_security_headers
输入参数
| 参数名称 | 必选 | 类型 | 描述 |
|---|---|---|---|
| action | 是 | String | 固定值 get_security_headers |
| site_name | 是 | String | 网站域名 |
输出参数
| 参数名称 | 类型 | 描述 |
|---|---|---|
| x_xss_protection | Boolean | XSS 保护开关 |
| x_content_type_options | Boolean | Content-Type 选项 |
| referrer_policy | Boolean | Referrer 策略 |
| content_security_policy | Boolean | CSP 策略 |
| permissions_policy | Boolean | 权限策略 |
示例
请求
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}