You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: go/grpcwebproxy/README.md
+12Lines changed: 12 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -68,6 +68,18 @@ $GOPATH/bin/grpcwebproxy \
68
68
--use_websockets
69
69
```
70
70
71
+
### Changing Websocket Compression
72
+
By default, websocket compression is used as `no context takover`. To override compression type, use the `--websocket_compression_mode` option.
73
+
Available options are `no_context_takeover`, `context_takeover`, `disabled`. Websocket compression types are described in [RFC 7692](https://datatracker.ietf.org/doc/html/rfc7692).
74
+
75
+
For example, for disabling websocket compression run the following:
76
+
```
77
+
$GOPATH/bin/grpcwebproxy \
78
+
--backend_addr=localhost:9090 \
79
+
--use_websockets \
80
+
--websocket_compression_mode=disabled
81
+
```
82
+
71
83
### Changing the Maximum Receive Message Size
72
84
73
85
By default, grpcwebproxy will limit the message size that the backend sends to the client. This is currently 4MB.
runHttpServer=pflag.Bool("run_http_server", true, "whether to run HTTP server")
41
43
runTlsServer=pflag.Bool("run_tls_server", true, "whether to run TLS server")
42
44
43
-
useWebsockets=pflag.Bool("use_websockets", false, "whether to use beta websocket transport layer")
44
-
websocketPingInterval=pflag.Duration("websocket_ping_interval", 0, "whether to use websocket keepalive pinging. Only used when using websockets. Configured interval must be >= 1s.")
45
-
websocketReadLimit=pflag.Int64("websocket_read_limit", 0, "sets the maximum message read limit on the underlying websocket. The default message read limit is 32769 bytes.")
45
+
useWebsockets=pflag.Bool("use_websockets", false, "whether to use beta websocket transport layer")
46
+
websocketPingInterval=pflag.Duration("websocket_ping_interval", 0, "whether to use websocket keepalive pinging. Only used when using websockets. Configured interval must be >= 1s.")
47
+
websocketReadLimit=pflag.Int64("websocket_read_limit", 0, "sets the maximum message read limit on the underlying websocket. The default message read limit is 32769 bytes.")
48
+
websocketCompressionMode=pflag.String("websocket_compression_mode", "no_context_takeover", "set compression mode for websocket. Values are no_context_takeover (, context_takeover, disabled. The default value is no_context_takeover.")
46
49
47
50
flagHttpMaxWriteTimeout=pflag.Duration("server_http_max_write_timeout", 10*time.Second, "HTTP server config, max write duration.")
48
51
flagHttpMaxReadTimeout=pflag.Duration("server_http_max_read_timeout", 10*time.Second, "HTTP server config, max read duration.")
0 commit comments