aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2012-10-11 20:48:29 +0200
committerLoïc Hoguin <[email protected]>2012-10-11 20:48:29 +0200
commit7b3d9943a9ead6624e639cb0229e608795cbc700 (patch)
tree4612abca7d59822aaba9c9144404e963cb807c60
parent642a8f73c9fef1fb8ce524169d619a80a6797ab0 (diff)
parentb5fdf02af0a803601ad34545bb71d8ac15bba221 (diff)
downloadcowboy-7b3d9943a9ead6624e639cb0229e608795cbc700.tar.gz
cowboy-7b3d9943a9ead6624e639cb0229e608795cbc700.tar.bz2
cowboy-7b3d9943a9ead6624e639cb0229e608795cbc700.zip
Merge branch 'dbmercer-patch-1' of git://github.com/dbmercer/cowboy.git
-rw-r--r--examples/static/rebar.config4
-rw-r--r--examples/static/src/static_app.erl3
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}}
]}
]}
],