WebSocket Upgrades

EnRoute Technical Reference

Specify per-route websocket upgrade

EnRoute supports WebSockets upgrade per route. Enabling a flag on a Route configuration for both GatewayHost and ServiceRoute enables upgrading connection to a webscoket connection

EnRoute Config

# Please edit the object below. Lines beginning with a '#' will be ignored,
# and an empty file will abort the edit. If an error occurs while saving this file will be
# reopened with the relevant failures.
#
apiVersion: enroute.saaras.io/v1
kind: GatewayHost
metadata:
  labels:
    app: httpbin
  name: httpbin-9000-gatewayhost-httpbin-host
  namespace: httpbin
spec:
  routes:
  - conditions:
    - prefix: /
    enableWebsockets: true
    - name: route-cors
      type: route_filter_cors
    services:
    - name: httpbin
      port: 9000
    timeoutPolicy:
      request: 300ms
  virtualhost:
    fqdn: '*'