This is the documentation for the latest development version of Contour. Both code and docs may be unstable, and these docs are not guaranteed to be up to date or correct. See the latest version.
WebSocket support can be enabled on specific routes using the enableWebsockets
field:
# httpproxy-websockets.yaml
apiVersion: projectcontour.io/v1
kind: HTTPProxy
metadata:
name: chat
namespace: default
spec:
virtualhost:
fqdn: chat.example.com
routes:
- services:
- name: chat-app
port: 80
- conditions:
- prefix: /websocket
enableWebsockets: true # Setting this to true enables websocket for all paths that match /websocket
services:
- name: chat-app
port: 80
Read our getting started documentation.