Skip to content

Commit

Permalink
fix(create-medusa-app): add default storefront url to auth CORS (#10853)
Browse files Browse the repository at this point in the history
* fix(create-medusa-app): add default storefront url to auth CORS

* add docs cors to store / admin
  • Loading branch information
shahednasser authored Jan 7, 2025
1 parent a989c50 commit 632600e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/grumpy-adults-relate.md
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
11 changes: 7 additions & 4 deletions packages/cli/create-medusa-app/src/utils/prepare-project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down

0 comments on commit 632600e

Please sign in to comment.