From a0b969bce30159ac707462dcb939600420c84680 Mon Sep 17 00:00:00 2001 From: Edward Viaene Date: Wed, 22 Jul 2020 15:25:18 +0200 Subject: [PATCH] set websocket upgrade type (#47) --- pkg/envoy/listener.go | 1 + pkg/envoy/xds_test.go | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/pkg/envoy/listener.go b/pkg/envoy/listener.go index d71cdb5..f09d2d9 100644 --- a/pkg/envoy/listener.go +++ b/pkg/envoy/listener.go @@ -181,6 +181,7 @@ func (l *Listener) getVirtualHost(hostname, targetHostname, targetPrefix, cluste Enabled: &wrappers.BoolValue{ Value: true, }, + UpgradeType: "websocket", }, } } diff --git a/pkg/envoy/xds_test.go b/pkg/envoy/xds_test.go index 1fbbb37..1e24ea3 100644 --- a/pkg/envoy/xds_test.go +++ b/pkg/envoy/xds_test.go @@ -586,6 +586,10 @@ func TestClusterWithWebsockets(t *testing.T) { t.Errorf("Upgrade config is not set to enabled") return } + if upgradeConfigs[0].UpgradeType != "websocket" { + t.Errorf("Upgrade config type is not set to websocket") + return + } } } func TestCompressionObject(t *testing.T) {