Disable Websockets

Disables websockets

Author
csalvato
Daily installs
0
Total installs
4,061
Ratings
2 0 0
Version
1.0
Created
2021-02-08
Updated
2021-02-08
License
N/A
Applies to
All sites

This is a script that you can use to enable or disable WebSockets. Useful for developing websites that use WebSockets, when you want to test the case where a connection cannot be established.

Heavily inspired by the code from this Stack Overflow answer: https://stackoverflow.com/questions/30912854/is-it-possible-to-temporarily-disable-a-websockets-connection-in-a-local-server