-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(create-medusa-app): add default storefront url to auth CORS (#10853)
* fix(create-medusa-app): add default storefront url to auth CORS * add docs cors to store / admin
- Loading branch information
1 parent
a989c50
commit 632600e
Showing
2 changed files
with
12 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"create-medusa-app": patch | ||
--- | ||
|
||
fix(create-medusa-app): add default storefront url to auth CORS |
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 |
---|---|---|
|
@@ -8,10 +8,13 @@ import ProcessManager from "./process-manager.js" | |
import type { Client } from "pg" | ||
|
||
const ADMIN_EMAIL = "[email protected]" | ||
const STORE_CORS = "http://localhost:8000,https://docs.medusajs.com" | ||
const ADMIN_CORS = | ||
"http://localhost:5173,http://localhost:9000,https://docs.medusajs.com" | ||
const AUTH_CORS = ADMIN_CORS | ||
let STORE_CORS = "http://localhost:8000" | ||
let ADMIN_CORS = | ||
"http://localhost:5173,http://localhost:9000" | ||
const DOCS_CORS = "https://docs.medusajs.com" | ||
const AUTH_CORS = [ADMIN_CORS, STORE_CORS, DOCS_CORS].join(",") | ||
STORE_CORS += `,${DOCS_CORS}` | ||
ADMIN_CORS += `,${DOCS_CORS}` | ||
const DEFAULT_REDIS_URL = "redis://localhost:6379" | ||
|
||
type PrepareOptions = { | ||
|