From 91cee0339a8b41014fc69a994e7eb719ad029d3a Mon Sep 17 00:00:00 2001 From: Alex Date: Fri, 6 Dec 2019 14:16:19 +0200 Subject: fix broken PREFIX_URL feature --- app/main.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'app/main.py') diff --git a/app/main.py b/app/main.py index 7031055..8489e4f 100644 --- a/app/main.py +++ b/app/main.py @@ -22,6 +22,8 @@ class Config: def __init__(self): for k, v in self._DEFAULTS.items(): setattr(self, k, os.environ[k] if k in os.environ else v) + if not self.URL_PREFIX.endswith('/'): + self.URL_PREFIX += '/' config = Config() @@ -35,10 +37,8 @@ class ObjectSerializer(json.JSONEncoder): serializer = ObjectSerializer() app = web.Application() sio = socketio.AsyncServer() -sio.attach(app) +sio.attach(app, socketio_path=config.URL_PREFIX + 'socket.io') routes = web.RouteTableDef() -if not config.URL_PREFIX.endswith('/'): - config.URL_PREFIX += '/' class Notifier(DownloadQueueNotifier): async def added(self, dl): -- cgit