Decouple ParamContainer which makes the code cleaner, and fix kemal.cr

url -- by @sdogruyol
This commit is contained in:
Fatih Kadir Akın 2016-03-06 14:08:59 +02:00
parent 8267ffe2c5
commit e53ba1d9da
2 changed files with 20 additions and 16 deletions

View file

@ -18,7 +18,7 @@ at_exit do
# This route serves the built-in images for not_found and exceptions.
get "/__kemal__/:image" do |env|
image = env.params["image"]
image = env.params.url["image"]
file_path = File.expand_path("libs/kemal/images/#{image}", Dir.current)
if File.exists? file_path
env.response.headers.add "Content-Type", "application/octet-stream"