fix: utiliser IP hostname au lieu de localhost dans le frontend
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
// Configuration API
|
||||
const API_URL = 'http://localhost:4001/api';
|
||||
// Configuration API - Déterminer l'URL de base
|
||||
const API_URL = window.location.hostname === 'localhost' || window.location.hostname === '127.0.0.1'
|
||||
? 'http://localhost:4001/api'
|
||||
: `http://${window.location.hostname}:4001/api`;
|
||||
|
||||
// State
|
||||
let currentUser = null;
|
||||
|
||||
Reference in New Issue
Block a user