Kaynağa Gözat

fix: adds store/admin cors to env variables

Sebastian Rindom 4 yıl önce
ebeveyn
işleme
c03aec98bd
1 değiştirilmiş dosya ile 2 ekleme ve 2 silme
  1. 2 2
      medusa-config.js

+ 2 - 2
medusa-config.js

@@ -1,8 +1,8 @@
 // CORS when consuming Medusa from admin
-const ADMIN_CORS = "https://app.medusa-commerce.com";
+const ADMIN_CORS = process.env.ADMIN_CORS || "https://app.medusa-commerce.com";
 
 // CORS to avoid issues when consuming Medusa from a client
-const STORE_CORS = "http://localhost:8000";
+const STORE_CORS = process.env.STORE_CORS || "http://localhost:8000";
 
 // Database URL (here we use a local database called medusa-development)
 const DATABASE_URL = "postgres://localhost/medusa-development";