netlify-functions-express icon indicating copy to clipboard operation
netlify-functions-express copied to clipboard

CORS issue for serverless-http

Open Slava-Ini opened this issue 3 years ago • 0 comments

It seems that there is no way to properly set the CORS headers using serverless-http for netlify. For the case with AWS it's possible to configure headers in serverless.yaml, but for netlify header config used in netlify.toml and _headers somehow gets overwritten by serverless-http, so after successful preflight, you would still get CORS error while sending request from other origin.

Slava-Ini avatar Nov 08 '22 06:11 Slava-Ini