diff options
Diffstat (limited to 'test/handlers/ws_reject_h.erl')
-rw-r--r-- | test/handlers/ws_reject_h.erl | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/handlers/ws_reject_h.erl b/test/handlers/ws_reject_h.erl new file mode 100644 index 0000000..c58e672 --- /dev/null +++ b/test/handlers/ws_reject_h.erl @@ -0,0 +1,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}. |