mirror of
https://github.com/AstrBotDevs/AstrBot.git
synced 2026-10-16 15:06:04 +08:00
docs: name the dashboard host/port environment variables and their precedence (#10095)
This commit is contained in:
@@ -621,6 +621,14 @@ class AstrBotDashboard:
|
||||
def run(self):
|
||||
ip_addr = []
|
||||
dashboard_config = self.core_lifecycle.astrbot_config.get("dashboard", {})
|
||||
# Environment beats config for both. Each accepts two names -- the unprefixed one first,
|
||||
# then the ASTRBOT_-prefixed one -- so DASHBOARD_HOST wins over ASTRBOT_DASHBOARD_HOST if
|
||||
# both are set. Unset everywhere, the dashboard binds 0.0.0.0:6185, i.e. every interface.
|
||||
#
|
||||
# The host chain is also read by AuthService.can_skip_default_password_auth, which only
|
||||
# allows that skip when the resolved host is 127.0.0.1, localhost or ::1. So these
|
||||
# variables decide where the dashboard listens and, indirectly, whether the default
|
||||
# password gate can be waived.
|
||||
port = (
|
||||
os.environ.get("DASHBOARD_PORT")
|
||||
or os.environ.get("ASTRBOT_DASHBOARD_PORT")
|
||||
|
||||
Reference in New Issue
Block a user