melonpan
melonpan copied to clipboard
Add CORS with default headers
Fix: to add a new property
private headers: Headers;
in Melonpan
, which contains all set headers, in order to pass them as a param in all the new Response()
objects. So now we just need to call melonpan.cors()
to set all the default headers, which are:
[
["Access-Control-Allow-Origin", "*"]
["Access-Control-Allow-Methods", "POST, GET, OPTIONS"]
["Access-Control-Allow-Headers", "X-PINGOTHER, Content-Type"]
["Access-Control-Max-Age", "86400"]
]
Hello?