Skip to content

Latest commit

 

History

History
27 lines (17 loc) · 632 Bytes

File metadata and controls

27 lines (17 loc) · 632 Bytes

Rust CORS multipart example

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.

Setup

This examples uses the Scaleway Serverless Framework Plugin.

Once this is set up, you can run:

npm install

serverless deploy

Then, from the given URL, you can run:

# Options request
curl -i -X OPTIONS <function URL>

# Get request
curl -i -X GET <function URL>