CORS filter modified to accept application/json