summaryrefslogtreecommitdiff
path: root/finance/odoo16/files/patch-odoo_http.py
blob: 9f163a8fbc064b1d79d19871887d4e72f273153c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
--- odoo/http.py.orig	2025-07-19 21:02:41 UTC
+++ odoo/http.py
@@ -257,13 +257,12 @@ ROUTING_KEYS = {
     'alias', 'host', 'methods',
 }
 
-if parse_version(werkzeug.__version__) >= parse_version('2.0.2'):
-    # Werkzeug 2.0.2 adds the websocket option. If a websocket request
-    # (ws/wss) is trying to access an HTTP route, a WebsocketMismatch
-    # exception is raised. On the other hand, Werkzeug 0.16 does not
-    # support the websocket routing key. In order to bypass this issue,
-    # let's add the websocket key only when appropriate.
-    ROUTING_KEYS.add('websocket')
+# Werkzeug 2.0.2 adds the websocket option. If a websocket request
+# (ws/wss) is trying to access an HTTP route, a WebsocketMismatch
+# exception is raised. On the other hand, Werkzeug 0.16 does not
+# support the websocket routing key. In order to bypass this issue,
+# let's add the websocket key only when appropriate.
+ROUTING_KEYS.add('websocket')
 
 # The default duration of a user session cookie. Inactive sessions are reaped
 # server-side as well with a threshold that can be set via an optional