Skip to content

Add CORS with default headers#18

Open
jetgriffin wants to merge 1 commit into
DarthBenro008:mainfrom
jetgriffin:add-cors-with-default-headers
Open

Add CORS with default headers#18
jetgriffin wants to merge 1 commit into
DarthBenro008:mainfrom
jetgriffin:add-cors-with-default-headers

Conversation

@jetgriffin

Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown
Contributor Author

Hello?

@sloorush sloorush requested a review from DarthBenro008 August 1, 2025 07:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant