We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 38ff389 commit 10a5febCopy full SHA for 10a5feb
reflex/app.py
@@ -531,8 +531,16 @@ def _setup_state(self) -> None:
531
if not self.sio:
532
self.sio = AsyncServer(
533
async_mode="asgi",
534
- cors_allowed_origins=[],
535
- cors_credentials=False,
+ cors_allowed_origins=(
+ (
536
+ "*"
537
+ if config.cors_allowed_origins == ("*",)
538
+ else list(config.cors_allowed_origins)
539
+ )
540
+ if config.transport == "websocket"
541
+ else []
542
+ ),
543
+ cors_credentials=config.transport == "websocket",
544
max_http_buffer_size=environment.REFLEX_SOCKET_MAX_HTTP_BUFFER_SIZE.get(),
545
ping_interval=environment.REFLEX_SOCKET_INTERVAL.get(),
546
ping_timeout=environment.REFLEX_SOCKET_TIMEOUT.get(),
0 commit comments