Skip to content

Instantly share code, notes, and snippets.

View monstermichl's full-sized avatar

Michel monstermichl

  • Austria
View GitHub Profile
@eproxus
eproxus / COWBOY_MIDDLEWARE.md
Last active November 19, 2024 21:31
How to Create a Cowboy Middleware

How to Create a Cowboy Middleware

Add an entry to the middlewares. Usually you want to keep the standard Cowboy handlers afterwards, but you can replace them if you want.

{ok, Pid} = cowboy:start_clear(ListenerName,
    [{port, Port}],
    #{
 env => #{dispatch => Dispatch},