Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: dfc7b9213b
Fetching contributors…

Cannot retrieve contributors at this time

20 lines (15 sloc) 0.56 kB
-module(cowboy_controller_routes).
-export([with/2]).
-export([default/0, error/0]).
default() ->
error().
error() ->
[{[<<"error">>,'...'], cowboy_http_static,
[{directory,
filename:join([code:lib_dir(cowboy_controller, priv),
"static"])},
{mimetypes, {fun(Path, _) -> mimetypes:filename(Path) end, []}},
{etag, {attributes, [filepath, filesize, inode, mtime]}}]}].
with(ExtraOpts, Routes) ->
[ {Path, Handler, lists:concat([ExtraOpts, Opts])}
|| {Path, Handler, Opts} <- Routes ].
Jump to Line
Something went wrong with that request. Please try again.