Skip to content

Commit

Permalink
Explicitly enable WebSocket upgrades (#18150)
Browse files Browse the repository at this point in the history
This PR explicitly enables WebSocket upgrades in Envoy's UpgradeConfig for all
proxy types. (API Gateway, Ingress, and Sidecar.)

Fixes #8283
  • Loading branch information
blake committed Jul 20, 2023
1 parent ada767f commit 2c5a09b
Show file tree
Hide file tree
Showing 81 changed files with 4,035 additions and 3,893 deletions.
3 changes: 3 additions & 0 deletions .changelog/18150.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:improvement
xds: Explicitly enable WebSocket connection upgrades in HTTP connection manager
```
4 changes: 4 additions & 0 deletions agent/xds/listeners.go
Original file line number Diff line number Diff line change
Expand Up @@ -2470,6 +2470,10 @@ func makeHTTPFilter(opts listenerFilterOpts) (*envoy_listener_v3.Filter, error)
// sampled.
RandomSampling: &envoy_type_v3.Percent{Value: 0.0},
},
// Explicitly enable WebSocket upgrades for all HTTP listeners
UpgradeConfigs: []*envoy_http_v3.HttpConnectionManager_UpgradeConfig{
{UpgradeType: "websocket"},
},
}

if opts.tracing != nil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,12 @@
"chain": true,
"dns": true,
"uri": true
}
},
"upgradeConfigs": [
{
"upgradeType": "websocket"
}
]
}
}
],
Expand Down Expand Up @@ -248,4 +253,4 @@
],
"typeUrl": "type.googleapis.com/envoy.config.listener.v3.Listener",
"nonce": "00000001"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,12 @@
"chain": true,
"dns": true,
"uri": true
}
},
"upgradeConfigs": [
{
"upgradeType": "websocket"
}
]
}
}
],
Expand Down Expand Up @@ -249,4 +254,4 @@
],
"typeUrl": "type.googleapis.com/envoy.config.listener.v3.Listener",
"nonce": "00000001"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,12 @@
"chain": true,
"dns": true,
"uri": true
}
},
"upgradeConfigs": [
{
"upgradeType": "websocket"
}
]
}
}
],
Expand Down Expand Up @@ -272,4 +277,4 @@
],
"typeUrl": "type.googleapis.com/envoy.config.listener.v3.Listener",
"nonce": "00000001"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,12 @@
"chain": true,
"dns": true,
"uri": true
}
},
"upgradeConfigs": [
{
"upgradeType": "websocket"
}
]
}
}
],
Expand Down Expand Up @@ -348,4 +353,4 @@
],
"typeUrl": "type.googleapis.com/envoy.config.listener.v3.Listener",
"nonce": "00000001"
}
}
Loading

0 comments on commit 2c5a09b

Please sign in to comment.