diff --git a/.env.template b/.env.template index 64fac66..2bc5b99 100644 --- a/.env.template +++ b/.env.template @@ -3,6 +3,7 @@ SUPERTOKENS_URI= SUPERTOKENS_KEY= BACKEND_URL= FRONTEND_URL= +FRONTEND_DEMO_URL= CRYPT_PASSWORD= IV= EMAIL_ADDRESS= diff --git a/index.js b/index.js index d28a947..e6ad70c 100644 --- a/index.js +++ b/index.js @@ -30,7 +30,7 @@ initSupertokens(); //cors configuration app.use( cors({ - origin: process.env.FRONTEND_URL, + origin: [process.env.FRONTEND_URL, process.env.FRONTEND_DEMO_URL], allowedHeaders: ["content-type", ...supertokens.getAllCORSHeaders()], credentials: true, })