diff --git a/infra/conf/transport_internet.go b/infra/conf/transport_internet.go index 08f5768e..1731695d 100644 --- a/infra/conf/transport_internet.go +++ b/infra/conf/transport_internet.go @@ -165,11 +165,13 @@ func (c *WebSocketConfig) Build() (proto.Message, error) { } // Priority (client): host > serverName > address for k, v := range c.Headers { - errors.PrintDeprecatedFeatureWarning(`"host" in "headers"`, `independent "host"`) - if c.Host == "" { - c.Host = v + if strings.ToLower(k) == "host"{ + errors.PrintDeprecatedFeatureWarning(`"host" in "headers"`, `independent "host"`) + if c.Host == "" { + c.Host = v + } + delete(c.Headers, k) } - delete(c.Headers, k) } config := &websocket.Config{ Path: path,