🔧 Simplify base URL logic to always use nginx proxy for CORS handling
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user