aboutsummaryrefslogtreecommitdiffstats
path: root/test/handlers/ws_reject_h.erl
blob: c58e672b42b873c4732d762c939b4e09f338dc63 (plain) (blame)
1
2
3
4
5
6
7
%% This handler rejects all Websocket connections.
-module(ws_reject_h).

-export([init/2]).

init(Req0, Env) ->
    {ok, cowboy_req:reply(400, #{}, <<"Upgrade rejected">>, Req0), Env}.