How will disabling websockets affect latency and traffic to my site?

As I understand it, Cloudflare proxies websockets between the client and server. However, unfortunately Cloudflare’s WAF rules are only applied to the intial connection to the site (subsequently ignoring traffic within the websocket). I would prefer that every request run the gauntlet of my WAF rules, so I’m considering disabling websockets on Cloudflare. Does anyone know how this will affect the end user experience?

The WebSocket proxy will only work/matter if your server itself is running some WebSocket server. If you don’t have any application/javascript that utilizes web sockets to your server, whether or not CF is set up to proxy WS connections doesn’t matter. Disabling it won’t affect speed.

I suppose, but Discord and many other customers that utilize the CF WS proxy don’t see it as a problem since they likely have very strict input validation on their server itself. If your main product utilizes WebSockets, you shouldn’t be relying on a WAF anyhow.


Thanks for the response; exactly what I was looking for!

This topic was automatically closed after 30 days. New replies are no longer allowed.