The status 400 is coming from cowboy_rest, when it complains that handler cowboy_static lacks the functions 'service_available', 'known_methods', 'uri_too_long', and 'allowed_methods'. Which indeed it does not have. The only place I mention cowboy_static is in the dispatch rule: {"/music/[...]", cowboy_static, {dir, "", [ {mimetypes, cow_mimetypes, all}]}},