setCorsHeaders function
Implementation
void setCorsHeaders(Res res) {
res.headers.add('Access-Control-Allow-Origin', '*');
res.headers.add('Access-Control-Allow-Methods', 'GET, POST, PUT, DELETE');
res.headers.add('Access-Control-Allow-Headers', 'Content-Type');
}