Enhance CORS middleware to include referer checks and improve security for whitelisted domains
All checks were successful
Deploy Production (ss-tools.crewsportswear.app) / deploy (push) Successful in 1m5s

This commit is contained in:
Frank John Begornia
2025-12-31 03:05:42 +08:00
parent 4b7d43efc2
commit 16fa00558b
2 changed files with 41 additions and 8 deletions

View File

@@ -15,13 +15,17 @@ if (process.env.USE_SSL === 'true') {
}
}
// CORS Configuration
// CORS Configuration - Whitelisted domains that can access the API
const allowedOrigins = [
'http://uniformnetwork.com',
'http://localhost',
'https://crewsportswear.com',
'https://www.crewsportswear.com',
'https://crewsportswear.app',
'https://merchbay.com'
'https://dev-crew.crewsportswear.app',
'https://merchbay.com',
'https://www.merchbay.com',
'https://dev.merchbay.app',
'http://localhost',
'http://localhost:8080'
];
// Screenshot Configuration