Increase the number of characters for webBasePath (#3239)

This commit is contained in:
xujie86 2025-07-22 18:53:12 +08:00 committed by GitHub
parent 87042d77ba
commit 75416eebd7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View file

@ -115,7 +115,7 @@ config_after_install() {
echo -e "${green}Access URL: http://${server_ip}:${config_port}/${config_webBasePath}${plain}" echo -e "${green}Access URL: http://${server_ip}:${config_port}/${config_webBasePath}${plain}"
echo -e "###############################################" echo -e "###############################################"
else else
local config_webBasePath=$(gen_random_string 15) local config_webBasePath=$(gen_random_string 18)
echo -e "${yellow}WebBasePath is missing or too short. Generating a new one...${plain}" echo -e "${yellow}WebBasePath is missing or too short. Generating a new one...${plain}"
/usr/local/x-ui/x-ui setting -webBasePath "${config_webBasePath}" /usr/local/x-ui/x-ui setting -webBasePath "${config_webBasePath}"
echo -e "${green}New WebBasePath: ${config_webBasePath}${plain}" echo -e "${green}New WebBasePath: ${config_webBasePath}${plain}"

View file

@ -214,7 +214,7 @@ reset_webbasepath() {
return return
fi fi
config_webBasePath=$(gen_random_string 10) config_webBasePath=$(gen_random_string 18)
# Apply the new web base path setting # Apply the new web base path setting
/usr/local/x-ui/x-ui setting -webBasePath "${config_webBasePath}" >/dev/null 2>&1 /usr/local/x-ui/x-ui setting -webBasePath "${config_webBasePath}" >/dev/null 2>&1