Cors in serverless function

how can i change Cross-Origin Resource Sharing policy for serverless functions

Have you tried on your server function response to add the CORS headers like

Access-Control-Allow-Origin

and any others you might need for your app?