-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdeploy-cors-fix.sh
More file actions
executable file
·37 lines (31 loc) · 1.07 KB
/
deploy-cors-fix.sh
File metadata and controls
executable file
·37 lines (31 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/bash
echo "🔧 Deploying CORS Fix..."
# Build frontend
echo "📦 Building frontend..."
cd frontend
npm run build
cd ..
# Commit changes
echo "💾 Committing CORS fixes..."
git add .
git commit -m "Fix CORS headers for error responses
- Add CORS headers to error handling middleware
- Improve error logging in login endpoint
- Temporarily disable CSRF for login/register endpoints for debugging
- Ensure CORS headers are present even when server errors occur
- Add better error handling and logging throughout"
# Push to trigger deployment
echo "🚀 Pushing to trigger deployment..."
git push origin main
echo "✅ CORS fixes deployed!"
echo ""
echo "🔧 Key fixes applied:"
echo " - CORS headers now included in error responses"
echo " - Better error logging in login endpoint"
echo " - CSRF temporarily disabled for login/register"
echo " - Improved error handling middleware"
echo ""
echo "🔍 Test the fixes:"
echo " - Try logging in from the frontend"
echo " - Check browser console for CORS errors"
echo " - Monitor server logs for detailed error information"