ItemController.update = function() {
// enable CORS
this.res.header("Access-Control-Allow-Origin", "*");
this.res.header("Access-Control-Allow-Headers", "X-Requested-With");
this.res.header('Access-Control-Allow-Methods', 'PUT, GET, POST, DELETE, OPTIONS');
this.res.header('Access-Control-Allow-Headers', 'Content-Type');
//your main processing code here ...
}