允许 PUT 和 DELETE 请求location /api/ { if ($request_method !~ ^(GET|POST|PUT|DELETE)$ ) { return 405; } # ... }
允许 PUT 和 DELETE 请求