🔧 Simplify base URL logic to always use nginx proxy for CORS handling

This commit is contained in:
2026-01-29 14:27:27 +00:00
parent fa26c50ebc
commit 8ba97c9d8b

View File

@@ -12,16 +12,10 @@ import { API_CONFIG } from '../utilities/constants.js';
/**
* Get the appropriate base URL based on environment
* Development: Use Vite proxy to avoid CORS
* Production: Use direct API (requires backend proxy or CORS handling)
* Always use nginx proxy to avoid CORS issues
*/
function getBaseURL() {
// In development, use Vite proxy
if (import.meta.env.DEV) {
return '/api/challonge/v1/';
}
// In production, use direct API (will need backend proxy for CORS)
return API_CONFIG.CHALLONGE_BASE_URL;
}
/**