mirror of
https://github.com/versity/versitygw.git
synced 2026-04-24 14:40:30 +00:00
fix: fix webui port validation to allow unix socket paths
Fixes #2009 The webui address validation loop called net.SplitHostPort on every address without first checking whether it was a unix socket path, causing an error for unix domain socket paths. The fix includes skipping the host:port validation for unix socket paths for webui.
This commit is contained in:
@@ -1113,6 +1113,9 @@ func runGateway(ctx context.Context, be backend.Backend) error {
|
||||
if len(webuiPorts) > 0 {
|
||||
// Validate all webui addresses
|
||||
for _, addr := range webuiPorts {
|
||||
if utils.IsUnixSocketPath(addr) {
|
||||
continue
|
||||
}
|
||||
_, webPrt, err := net.SplitHostPort(addr)
|
||||
if err != nil {
|
||||
return fmt.Errorf("webui listen address must be in the form ':port' or 'host:port': %w", err)
|
||||
|
||||
Reference in New Issue
Block a user