OpenResty 清除 Sever 头信息
OpenResty HTTP About 292 words需求
HTTP返回的Header中不带Server字段。
方式
使用OpenResty自带并默认开启的headers-more-nginx-module模块清除Header信息。在配置文件中添加以下代码,作用域:http,server,location,location if。
more_clear_headers 'Server';
备注
不能清除Connection的返回头信息。
headers-more-nginx-module模块还可用来设置其他头信息。
文档
Views: 6,082 · Posted: 2020-10-04
————        END        ————
Give me a Star, Thanks:)
https://github.com/fendoudebb/LiteNote扫描下方二维码关注公众号和小程序↓↓↓
Loading...