Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Clacks Middleware for Cowboy on Erlang.
%% A man is not dead while his name is still spoken.
-module(clacks_middleware).
-behaviour(cowboy_middleware).
-export([execute/2]).
execute(Req, Env) ->
ReqWithClacks = cowboy_req:set_resp_header(<<"x-clacks-overhead">>, <<"GNU Terry Pratchett">>, Req),
{ok, ReqWithClacks, Env}.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment