Skip to content

Can nginx do transparent compression of websocket connections #2161

Discussion options

You must be logged in to vote

just edit your nginx config. It is the same for static sites, proxies or websockets

gzip on; //enables gzip for request
gzip_proxied any; //enables compression on proxies
gzip_types *; //compress everything there is

if this does not work, try compressing the messages befor sending them through the socket.
You can read more about it here: https://docs.nginx.com/nginx/admin-guide/web-server/compression/

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by alex-semenyuk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants