diff --git a/.env b/.env index 20b9709..d6792f2 100644 --- a/.env +++ b/.env @@ -1,4 +1,5 @@ # Frontend Environment Variables VITE_API_URL=http://localhost:5000/api VITE_APP_NAME=Reats -VITE_MAX_FILE_SIZE=10485760 \ No newline at end of file +VITE_MAX_FILE_SIZE=10485760 +VITE_GOOGLE_CLIENT_ID=611443197662-234aapq5b7gpsl7n7e4mpa9nrnfu872p.apps.googleusercontent.com \ No newline at end of file diff --git a/backend/server.js b/backend/server.js index f890bf3..51bdad1 100644 --- a/backend/server.js +++ b/backend/server.js @@ -58,8 +58,18 @@ if (validateEmailConfig()) { app.use(helmet()); // CORS configuration +const corsOrigins = process.env.CORS_ORIGIN === 'true' + ? true + : [ + 'http://localhost:5173', + 'http://localhost:5000', + 'https://reats.in', + 'https://atschecker.onrender.com', + process.env.FRONTEND_URL + ].filter(Boolean); + app.use(cors({ - origin: process.env.CORS_ORIGIN === 'true' ? true : (process.env.CORS_ORIGIN || 'http://localhost:5173'), + origin: corsOrigins, credentials: true, methods: ['GET', 'POST', 'PUT', 'DELETE', 'OPTIONS'], allowedHeaders: ['Content-Type', 'Authorization'] diff --git a/frontend/.env.production b/frontend/.env.production new file mode 100644 index 0000000..878b725 --- /dev/null +++ b/frontend/.env.production @@ -0,0 +1,9 @@ +# Production API Configuration +VITE_API_BASE_URL=https://atschecker.onrender.com/api + +# File Storage +VITE_CLOUDINARY_CLOUD_NAME=serviceconnect +VITE_CLOUDINARY_API_KEY=924936564656795 + +# Feature Flags +VITE_ENABLE_ANALYTICS=true diff --git a/frontend/dev-dist/sw.js b/frontend/dev-dist/sw.js index 27dd882..19a576f 100644 --- a/frontend/dev-dist/sw.js +++ b/frontend/dev-dist/sw.js @@ -82,7 +82,7 @@ define(['./workbox-ca84f546'], (function (workbox) { 'use strict'; "revision": "3ca0b8505b4bec776b69afdba2768812" }, { "url": "index.html", - "revision": "0.c65vvm8ksvg" + "revision": "0.bijt0966jc" }], {}); workbox.cleanupOutdatedCaches(); workbox.registerRoute(new workbox.NavigationRoute(workbox.createHandlerBoundToURL("index.html"), {