Is there a way to configure CORS OPTIONS to respond with a custom Access-Control-Max-Age header? I think the default is 5 secs in the absence of this header - which leads to a lot of extra preflights…
Did you try including headers in your lambda response?
headers: {
"Access-Control-Max-Age" : "your_favorite_value_here"
},
That doesn’t work. We need a way to set Access-Control-Max-Age
for the OPTIONS request.