Updated CORS filter to support PATCH and PUT