From 854b74254ca0094bfc2827c69520e83f4f3f30a7 Mon Sep 17 00:00:00 2001 From: Artucuno <28388670+Artucuno@users.noreply.github.com> Date: Tue, 31 Oct 2023 11:35:42 +1100 Subject: [PATCH] Update socket_manager.py Adds the socketio_path route to the app --- fastapi_socketio/socket_manager.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fastapi_socketio/socket_manager.py b/fastapi_socketio/socket_manager.py index ff23726..65a2f56 100644 --- a/fastapi_socketio/socket_manager.py +++ b/fastapi_socketio/socket_manager.py @@ -33,6 +33,8 @@ def __init__( ) app.mount(mount_location, self._app) + app.add_route(f"/{socketio_path}/", route=self._app, methods=["GET", "POST"]) + app.add_websocket_route(f"/{socketio_path}/", self._app) app.sio = self._sio def is_asyncio_based(self) -> bool: