From 721921b37520298ae7d17c355a7c93e965bab7ab Mon Sep 17 00:00:00 2001 From: MHSanaei Date: Tue, 19 May 2026 15:18:55 +0200 Subject: [PATCH] fix --- config/config.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/config/config.go b/config/config.go index a27ba7f9..5f7d1a6a 100644 --- a/config/config.go +++ b/config/config.go @@ -58,11 +58,13 @@ func IsDebug() bool { return os.Getenv("XUI_DEBUG") == "true" } -// AllowPrivateIPs returns true if user bypasses security checks via the ALLOW_PRIVATES environment variable. +// AllowPrivateIPs returns true if private/loopback IPs are allowed for outbound test/inform/Telegram-API URLs via the XUI_ALLOW_PRIVATE_IPS environment variable. var AllowPrivateIPs = sync.OnceValue(allowPrivateIPs) func allowPrivateIPs() bool { - return os.Getenv("ALLOW_PRIVATE_IPS") == "true" + return os.Getenv("XUI_ALLOW_PRIVATE_IPS") == "true" +} + // IsSkipHSTS returns true if skipping HSTS mode is enabled via the XUI_SKIP_HSTS environment variable. func IsSkipHSTS() bool { return os.Getenv("XUI_SKIP_HSTS") == "true"