限制请求方法的配置如下:
if ($request_method !~ ^(GET|POST)$ ) { return 405; }
$request_method能够获取到请求nginx的method