diff options
author | Micah Lee <micah@micahflee.com> | 2021-12-21 15:01:35 -0800 |
---|---|---|
committer | Micah Lee <micah@micahflee.com> | 2021-12-21 15:01:35 -0800 |
commit | 3da0b7a3eafc78d27a357ffdcc2c1bdab79e87ec (patch) | |
tree | 7ad82a28637982a2aa6f63885b7cb39dbdf18914 /cli/onionshare_cli/web/web.py | |
parent | 7e55e8e816e86a9e85b8308e9705c4e403f3bb37 (diff) | |
download | onionshare-3da0b7a3eafc78d27a357ffdcc2c1bdab79e87ec.tar.gz onionshare-3da0b7a3eafc78d27a357ffdcc2c1bdab79e87ec.zip |
Enable websocket logs in verbose mode
Diffstat (limited to 'cli/onionshare_cli/web/web.py')
-rw-r--r-- | cli/onionshare_cli/web/web.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/cli/onionshare_cli/web/web.py b/cli/onionshare_cli/web/web.py index 4f0625a0..fc5f86fe 100644 --- a/cli/onionshare_cli/web/web.py +++ b/cli/onionshare_cli/web/web.py @@ -89,7 +89,7 @@ class Web: # # It's probably #notourbug but we can fix it by forcing the mimetype. # https://github.com/onionshare/onionshare/issues/1443 - mimetypes.add_type('text/javascript', '.js') + mimetypes.add_type("text/javascript", ".js") # The flask app self.app = Flask( @@ -162,7 +162,10 @@ class Web: elif self.mode == "website": self.website_mode = WebsiteModeWeb(self.common, self) elif self.mode == "chat": - self.socketio = SocketIO() + if self.common.verbose: + self.socketio = SocketIO(logger=True, engineio_logger=True) + else: + self.socketio = SocketIO() self.socketio.init_app(self.app) self.chat_mode = ChatModeWeb(self.common, self) |