-
-
Notifications
You must be signed in to change notification settings - Fork 229
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
23 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
export const CORS_HEADERS = { | ||
"Access-Control-Allow-Origin": "*", | ||
"Access-Control-Allow-Methods": "POST, OPTIONS", | ||
// The Content-Type header is required to allow requests to be sent with a | ||
// Content-Type of "application/json". This is because "application/json" is | ||
// not an allowed value for Content-Type to be considered a CORS-safelisted | ||
// header. | ||
// - https://developer.mozilla.org/en-US/docs/Glossary/CORS-safelisted_request_header | ||
"Access-Control-Allow-Headers": "Content-Type", | ||
} | ||
|
||
export const DEFAULT_HEADERS = { | ||
...CORS_HEADERS, | ||
"Content-Type": "application/json", | ||
} // CORS headers need to be sent in responses to both preflight ("OPTIONS") and | ||
// actual requests. | ||
|
||
export const STRIPE_API_VERSION = "2023-10-16" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters