Cloudflare Docs
Cloudflare Zero Trust
Edit this page on GitHub
Set theme to dark (⇧+D)

Filter WebSocket traffic

Gateway does not inspect or log WebSocket traffic. Instead, Gateway will only log the HTTP details used to make the WebSocket connection, as well as network session information. To filter your WebSocket traffic, create a policy with the 101 HTTP response code.

SelectorOperatorValueAction
HTTP Responseis101 SWITCHING_PROTOCOLSAllow