I have an email from Incapsula explaining they don't support websockets. I find this strange to say the least, and their support rep just copy pasted a wikipedia article (they don't even seem to know what it is).
I'm getting all sort of 'malformed' requests when I try to run websockets with their service, though.
I would guess that, given
that Incapsula doesn't support websockets. Whatever it is you're trying to do, you'll need to do it a different way (or change CDNs).