This function shows how to handle preflight CORS requests that will be sent by a browser when invoking a multipart function.
The example uses totally permissive, open CORS, you will may want to modify this to make it more secure.
This examples uses the Scaleway Serverless Framework Plugin.
Once this is set up, you can run:
npm install
serverless deployThen, from the given URL, you can run:
# Options request
curl -i -X OPTIONS <function URL>
# Get request
curl -i -X GET <function URL>