diff options
Diffstat (limited to 'examples')
-rw-r--r-- | examples/static/rebar.config | 4 | ||||
-rw-r--r-- | examples/static/src/static_app.erl | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/examples/static/rebar.config b/examples/static/rebar.config index 6ad3062..eb6f194 100644 --- a/examples/static/rebar.config +++ b/examples/static/rebar.config @@ -1,4 +1,6 @@ {deps, [ {cowboy, ".*", - {git, "git://github.com/extend/cowboy.git", "master"}} + {git, "git://github.com/extend/cowboy.git", "master"}}, + {mimetypes, ".*", + {git, "git://github.com/spawngrid/mimetypes.git", "master"}} ]}. diff --git a/examples/static/src/static_app.erl b/examples/static/src/static_app.erl index 0777aec..16ef554 100644 --- a/examples/static/src/static_app.erl +++ b/examples/static/src/static_app.erl @@ -14,7 +14,8 @@ start(_Type, _Args) -> Dispatch = [ {'_', [ {['...'], cowboy_static, [ - {directory, {priv_dir, static, []}} + {directory, {priv_dir, static, []}}, + {mimetypes, {fun mimetypes:path_to_mimes/2, default}} ]} ]} ], |