mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-14 12:20: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 ->
|
undefined ->
|
||||||
{cowboy_websocket, Req0, State};
|
{cowboy_websocket, Req0, State};
|
||||||
Subprotocols ->
|
Subprotocols ->
|
||||||
case lists:keymember(<<"mqtt">>, 1, Subprotocols) of
|
case lists:member(<<"mqtt">>, 1, Subprotocols) of
|
||||||
true ->
|
true ->
|
||||||
Req = cowboy_req:set_resp_header(<<"sec-websocket-protocol">>,
|
Req = cowboy_req:set_resp_header(<<"sec-websocket-protocol">>,
|
||||||
<<"mqtt">>, Req0),
|
<<"mqtt">>, Req0),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue