melonpan icon indicating copy to clipboard operation
melonpan copied to clipboard

Add CORS with default headers

Open jetgriffin opened this issue 2 years ago • 1 comments

Captura de pantalla de 2022-10-17 20-50-11 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"]
]

jetgriffin avatar Oct 18 '22 00:10 jetgriffin

Hello?

jetgriffin avatar Feb 07 '23 03:02 jetgriffin