aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/cowboy_static.erl1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/cowboy_static.erl b/src/cowboy_static.erl
index 1b4ff89..305d6bd 100644
--- a/src/cowboy_static.erl
+++ b/src/cowboy_static.erl
@@ -217,6 +217,7 @@ rest_init(Req, Opts) ->
Directory1 = directory_path(Directory),
Mimetypes = proplists:get_value(mimetypes, Opts, []),
Mimetypes1 = case Mimetypes of
+ {{M, F}, E} -> {fun M:F/2, E};
{_, _} -> Mimetypes;
[] -> {fun path_to_mimetypes/2, []};
[_|_] -> {fun path_to_mimetypes/2, Mimetypes}