mirror of
https://gitea.invidious.io/iv-org/shard-kemal.git
synced 2024-08-15 00:53:36 +00:00
Don't serve 404 image dynamically
This commit is contained in:
parent
6fbad555d0
commit
88b4737500
1 changed files with 3 additions and 3 deletions
|
@ -48,9 +48,9 @@ module Kemal
|
||||||
end
|
end
|
||||||
|
|
||||||
# This route serves the built-in images for not_found and exceptions.
|
# This route serves the built-in images for not_found and exceptions.
|
||||||
get "/__kemal__/:image" do |env|
|
get "/__kemal__/404.png" do |env|
|
||||||
image = env.params.url["image"]
|
file_path = File.expand_path("lib/kemal/images/404.png", 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
|
else
|
||||||
|
|
Loading…
Reference in a new issue