node: fix vhosts for adminAPI

This commit is contained in:
ericxtheodore 2025-08-23 16:03:03 +08:00 committed by GitHub
parent 276ed4848c
commit 371489d217
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -191,7 +191,7 @@ func (api *adminAPI) StartHTTP(host *string, port *int, cors *string, apis *stri
} }
if vhosts != nil { if vhosts != nil {
config.Vhosts = nil config.Vhosts = nil
for _, vhost := range strings.Split(*host, ",") { for _, vhost := range strings.Split(*vhosts, ",") {
config.Vhosts = append(config.Vhosts, strings.TrimSpace(vhost)) config.Vhosts = append(config.Vhosts, strings.TrimSpace(vhost))
} }
} }