location / {
    if ($request_method ~ ^(PUT|DELETE)$ ) {
        return 405;
    }
}
