kemal/src/kemal/static_file_handler.cr

12 lines
332 B
Crystal
Raw Normal View History

2016-07-17 11:10:56 +00:00
# Kemal::StaticFileHandler is used to serve static files(.js/.css/.png e.g).
# This handler is on by default and you can disable it like.
#
# serve_static false
#
2015-12-10 19:20:32 +00:00
class Kemal::StaticFileHandler < HTTP::StaticFileHandler
2016-01-24 11:31:07 +00:00
def call(context)
return call_next(context) if context.request.path.not_nil! == "/"
2015-12-10 19:15:28 +00:00
super
end
end