File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -331,6 +331,13 @@ def run_app(
331331
332332 log_config : dict [str , Any ] = copy .deepcopy (uvicorn .config .LOGGING_CONFIG )
333333
334+ # Workaround for workbench issue 7368
335+ deflate_args : DeflateArgs = {}
336+ if (RS_SERVER_URL := os .getenv ("RS_SERVER_URL" )):
337+ deflate_args = {
338+ "ws_per_message_deflate" : False ,
339+ }
340+
334341 if reload_dirs is None :
335342 reload_dirs = []
336343 if app_dir is not None :
@@ -412,7 +419,7 @@ def run_app(
412419 # Don't allow shiny to use uvloop!
413420 # https://github.com/posit-dev/py-shiny/issues/1373
414421 loop = "asyncio" ,
415- ws_per_message_deflate = False , # Workaround for workbench issue 7368
422+ ** deflate_args , # pyright: ignore[reportArgumentType]
416423 ** reload_args , # pyright: ignore[reportArgumentType]
417424 ** kwargs ,
418425 )
@@ -713,6 +720,8 @@ class ReloadArgs(TypedDict):
713720 reload_excludes : NotRequired [list [str ]]
714721 reload_dirs : NotRequired [list [str ]]
715722
723+ class DeflateArgs (TypedDict ):
724+ ws_per_message_deflate : NotRequired [bool ]
716725
717726# Check that the version of rsconnect supports Shiny Express; can be removed in the
718727# future once this version of rsconnect is widely used. The dependency on "packaging"
You can’t perform that action at this time.
0 commit comments