Handle missing 404 image. Fixes #263
This commit is contained in:
parent
9e27fb6ba0
commit
92ea55773b
2 changed files with 2 additions and 0 deletions
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
|
@ -41,6 +41,8 @@ module Kemal
|
||||||
file_path = File.expand_path("lib/kemal/images/#{image}", Dir.current)
|
file_path = File.expand_path("lib/kemal/images/#{image}", Dir.current)
|
||||||
if File.exists? file_path
|
if File.exists? file_path
|
||||||
send_file env, file_path
|
send_file env, file_path
|
||||||
|
else
|
||||||
|
halt env, 404
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue