github.com/xmplusdev/xray-core@v1.8.10/transport/internet/httpupgrade/config.go (about) 1 package httpupgrade 2 3 import ( 4 "github.com/xmplusdev/xray-core/common" 5 "github.com/xmplusdev/xray-core/transport/internet" 6 ) 7 8 func (c *Config) GetNormalizedPath() string { 9 path := c.Path 10 if path == "" { 11 return "/" 12 } 13 if path[0] != '/' { 14 return "/" + path 15 } 16 return path 17 } 18 19 func init() { 20 common.Must(internet.RegisterProtocolConfigCreator(protocolName, func() interface{} { 21 return new(Config) 22 })) 23 }