chore: add leading slash to ws-path

This commit is contained in:
wwqgtxx 2023-12-18 23:22:50 +08:00
parent f29329fe80
commit f16ebf9bfe

View File

@ -338,6 +338,10 @@ func streamWebsocketConn(ctx context.Context, conn net.Conn, c *WebsocketConfig,
RawQuery: u.RawQuery,
}
if !strings.HasPrefix(uri.Path, "/") {
uri.Path = "/" + uri.Path
}
if c.TLS {
uri.Scheme = "wss"
config := c.TLSConfig