Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/5-internal/websocket-endpoint
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cannon: Add /websocket endpoint which is the same as /await
1 change: 1 addition & 0 deletions charts/cannon/conf/static/zauth.acl
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
a (whitelist (regex "/await")
(regex "/websocket")
(regex "(/v[0-9]+)?/events"))
4 changes: 4 additions & 0 deletions charts/cannon/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@ nginx_conf:
envs:
- all
use_websockets: true
- path: /websocket
envs:
- all
use_websockets: true
- path: /events
envs:
- all
Expand Down
17 changes: 17 additions & 0 deletions libs/wire-api/src/Wire/API/Routes/Public/Cannon.hs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,23 @@ type CannonAPI =
-- FUTUREWORK: Consider higher-level web socket combinator
:> WebSocketPending
)
:<|> Named
"websocket"
( Summary "Establish websocket connection"
:> Description "This is a temporary copy of await, please do not use it"
:> "websocket"
:> ZUser
:> ZConn
:> QueryParam'
[ Optional,
Strict,
Description "Client ID"
]
"client"
ClientId
-- FUTUREWORK: Consider higher-level web socket combinator
:> WebSocketPending
)
:<|> Named
"consume-events@v8"
( Summary "Consume events over a websocket connection"
Expand Down
1 change: 1 addition & 0 deletions services/cannon/src/Cannon/API/Public.hs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import Wire.API.Routes.Public.Cannon
publicAPIServer :: ServerT CannonAPI Cannon
publicAPIServer =
Named @"await-notifications" streamData
:<|> Named @"websocket" streamData
:<|> Named @"consume-events@v8" (\userId mClientId -> consumeEvents userId mClientId Nothing)
:<|> Named @"consume-events" consumeEvents

Expand Down