Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Frontend Environment Variables
VITE_API_URL=http://localhost:5000/api
VITE_APP_NAME=Reats
VITE_MAX_FILE_SIZE=10485760
VITE_MAX_FILE_SIZE=10485760
VITE_GOOGLE_CLIENT_ID=611443197662-234aapq5b7gpsl7n7e4mpa9nrnfu872p.apps.googleusercontent.com
12 changes: 11 additions & 1 deletion backend/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,18 @@
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,
Comment thread Dismissed
credentials: true,
methods: ['GET', 'POST', 'PUT', 'DELETE', 'OPTIONS'],
allowedHeaders: ['Content-Type', 'Authorization']
Expand Down
9 changes: 9 additions & 0 deletions frontend/.env.production
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion frontend/dev-dist/sw.js
Original file line number Diff line number Diff line change
Expand Up @@ -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"), {
Expand Down
Loading