setCorsHeaders function

void setCorsHeaders(
  1. Res res
)

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');
}