🎉 Improved codebase structure & documentation 🖥️📚
This commit is contained in:
@@ -24,17 +24,17 @@ class AdminLiveDashboard {
|
||||
|
||||
console.log('🔍 Live Dashboard API URL Detection:', { currentHost, currentProtocol, currentPort });
|
||||
|
||||
// Wenn wir bereits auf dem richtigen Port sind, verwende relative URLs
|
||||
if (currentPort === '443' || !currentPort) {
|
||||
console.log('✅ Verwende relative URLs (HTTPS Port 443)');
|
||||
// Prüfe ob wir bereits auf dem richtigen Port sind
|
||||
if (currentPort === '5000') {
|
||||
console.log('✅ Verwende relative URLs (bereits auf Port 5000)');
|
||||
return '';
|
||||
}
|
||||
|
||||
// Für alle anderen Fälle, verwende HTTPS auf Port 443
|
||||
const fallbackUrl = `https://${currentHost}`;
|
||||
console.log('🔄 Fallback zu HTTPS:443:', fallbackUrl);
|
||||
// Für Entwicklung: Verwende HTTP Port 5000
|
||||
const devUrl = `http://${currentHost}:5000`;
|
||||
console.log('🔄 Fallback zu HTTP:5000:', devUrl);
|
||||
|
||||
return fallbackUrl;
|
||||
return devUrl;
|
||||
}
|
||||
|
||||
init() {
|
||||
|
Reference in New Issue
Block a user