在安全扫描中,一般会要求禁用除get和post以外的http方法,nginx可在location下通过以下配置实现:
if ($request_method !~* GET|POST) {
return 403
}
也可在server配置,作为统一的配置
nginx屏蔽http方法
最新推荐文章于 2024-05-11 10:48:35 发布
在安全扫描中,一般会要求禁用除get和post以外的http方法,nginx可在location下通过以下配置实现:
if ($request_method !~* GET|POST) {
return 403
}
也可在server配置,作为统一的配置