0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-14 04:10:24 +00:00

Fix Websocket subprotocol example

This commit is contained in:
Loïc Hoguin 2023-12-07 14:17:13 +01:00
parent 4907734a83
commit 32594a5199
No known key found for this signature in database
GPG key ID: 8A9DF795F6FED764

View file

@ -62,7 +62,7 @@ init(Req0, State) ->
undefined ->
{cowboy_websocket, Req0, State};
Subprotocols ->
case lists:keymember(<<"mqtt">>, 1, Subprotocols) of
case lists:member(<<"mqtt">>, 1, Subprotocols) of
true ->
Req = cowboy_req:set_resp_header(<<"sec-websocket-protocol">>,
<<"mqtt">>, Req0),