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:
parent
4907734a83
commit
32594a5199
1 changed files with 1 additions and 1 deletions
|
@ -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),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue