kemal v0.21.0 Release Notes
Release Date: 2017-09-05 // over 6 years ago-
- ๐ฑ Dynamically insert handlers ๐ช Fixes #376.
โ Add context to WebSocket. This allows one to use
HTTP::Server::Context
inws
declarations ๐ Fixes #349.ws "/:room_name" do |socket, env| env.params.url["room_name"]end
โ Add support for customizing the headers of built-in
Kemal::StaticFileHandler
๐จ Useful for supportingCORS
for single page applications ๐static_headers do |response, filepath, filestat| if filepath =~ /.html$/ response.headers.add("Access-Control-Allow-Origin", "*") end response.headers.add("Content-Size", filestat.size.to_s) endend
๐ Allow %w in Handler macros #385. Thanks @will ๐
๐ Security: X-Content-Type-Options: nosniff for static files. Fixes #379. Thanks @crisward ๐
๐ Performance: Remove tempfile management to OS. This brings %10 - 15 performance boost to Kemal ๐