summaryrefslogtreecommitdiff
path: root/cli/onionshare_cli/web/chat_mode.py
diff options
context:
space:
mode:
Diffstat (limited to 'cli/onionshare_cli/web/chat_mode.py')
-rw-r--r--cli/onionshare_cli/web/chat_mode.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/cli/onionshare_cli/web/chat_mode.py b/cli/onionshare_cli/web/chat_mode.py
index e9b573dd..f6dc2d1a 100644
--- a/cli/onionshare_cli/web/chat_mode.py
+++ b/cli/onionshare_cli/web/chat_mode.py
@@ -39,6 +39,12 @@ class ChatModeWeb:
# This tracks the history id
self.cur_history_id = 0
+ # Whether or not we can send REQUEST_INDIVIDUAL_FILE_STARTED
+ # and maybe other events when requests come in to this mode
+ # Chat mode has no concept of individual file requests that
+ # turn into history widgets in the GUI, so set it to False
+ self.supports_file_requests = False
+
self.define_routes()
def define_routes(self):
@@ -46,7 +52,7 @@ class ChatModeWeb:
The web app routes for chatting
"""
- @self.web.app.route("/")
+ @self.web.app.route("/", methods=["GET"], provide_automatic_options=False)
def index():
history_id = self.cur_history_id
self.cur_history_id += 1
@@ -72,7 +78,7 @@ class ChatModeWeb:
)
return self.web.add_security_headers(r)
- @self.web.app.route("/update-session-username", methods=["POST"])
+ @self.web.app.route("/update-session-username", methods=["POST"], provide_automatic_options=False)
def update_session_username():
history_id = self.cur_history_id
data = request.get_json()