diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 14f890967..be073f4b5 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -4,9 +4,7 @@
-
-
-
+
@@ -48,7 +46,7 @@
"RunOnceActivity.TerminalTabsStorage.copyFrom.TerminalArrangementManager": "true",
"RunOnceActivity.git.unshallow": "true",
"SHELLCHECK.PATH": "/Users/cyberpersons/Library/Application Support/JetBrains/PyCharm2025.1/plugins/Shell Script/shellcheck",
- "git-widget-placeholder": "v2.4.4-dev",
+ "git-widget-placeholder": "stable",
"last_opened_file_path": "/Users/cyberpersons/cyberpanel",
"node.js.detected.package.eslint": "true",
"node.js.detected.package.tslint": "true",
@@ -118,6 +116,7 @@
+
diff --git a/CyberCP/settings.py b/CyberCP/settings.py
index 242636410..4d827169f 100644
--- a/CyberCP/settings.py
+++ b/CyberCP/settings.py
@@ -33,8 +33,13 @@ SECRET_KEY = os.getenv('SECRET_KEY', 'xr%j*p!*$0d%(-(e%@-*hyoz4$f%y77coq0u)6pwmj
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = os.getenv('DEBUG', 'False').lower() == 'true'
-# Allow configuration via environment variable, fallback to wildcard for backward compatibility
-ALLOWED_HOSTS = os.getenv('ALLOWED_HOSTS', '*').split(',')
+# Allow configuration via environment variable, with dynamic host detection
+allowed_hosts_env = os.getenv('ALLOWED_HOSTS', '')
+if allowed_hosts_env:
+ ALLOWED_HOSTS = allowed_hosts_env.split(',')
+else:
+ # Default to localhost and auto-detect server IP from request
+ ALLOWED_HOSTS = ['localhost', '127.0.0.1', '*']
# Application definition