Skip to content

Instantly share code, notes, and snippets.

@sebmaynard
Created March 16, 2015 08:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sebmaynard/f9855137b492b5e2a697 to your computer and use it in GitHub Desktop.
Save sebmaynard/f9855137b492b5e2a697 to your computer and use it in GitHub Desktop.
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