let loader _root path _request = match Content.read ("assets/" ^ path) with | None -> Dream.empty `Not_Found (* Template.err (`Bad_Request, "file doesn't exist") *) | Some asset -> (* TODO cache-control: ~headers:[ ("Cache-Control", "max-age=151200") ] *) Dream.respond asset let get = Dream.static ~loader ""