setCors method
dynamic
setCors({})
Implementation
dynamic setCors({String Methods='GET, POST, PUT, PATCH, DELETE', int MaxAge=36000, String Origins='*', }){
res?.headers.set('Access-Control-Allow-Origin', Origins);
res?.headers.set('Access-Control-Allow-Methods', Methods);
res?.headers.set('Access-Control-Allow-Headers', '*');
res?.headers.set('Access-Control-Max-Age', MaxAge);
}