From 1a1584ce2d78eb66472824071062213936e7b2bc Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Wed, 26 Apr 2023 16:51:55 +0000 Subject: [PATCH] web: Enable best compression for websocket connections Signed-off-by: Michael Tremer --- src/web/base.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/web/base.py b/src/web/base.py index 3ed6c250..19b63a9d 100644 --- a/src/web/base.py +++ b/src/web/base.py @@ -324,6 +324,13 @@ class APIMixin(KerberosAuthMixin, BackendMixin): raise AttributeError + def get_compression_options(self): + # Enable maximum compression + return { + "compression_level" : 9, + "mem_level" : 9, + } + def write_error(self, code, **kwargs): # Send a JSON-encoded error message self.finish({ -- 2.47.2