mirror of
https://gitea.invidious.io/iv-org/shard-kemal.git
synced 2024-08-15 00:53:36 +00:00
Allow 404 error handler to be customizable
This commit is contained in:
parent
92d7273759
commit
67abb5fff3
3 changed files with 9 additions and 8 deletions
|
@ -12,8 +12,10 @@ module Kemal
|
|||
config.server = HTTP::Server.new(config.host_binding.not_nil!, config.port, config.handlers)
|
||||
config.server.not_nil!.ssl = config.ssl
|
||||
|
||||
error 404 do |env|
|
||||
render_404(env)
|
||||
unless Kemal.config.error_handlers.has_key?(404)
|
||||
error 404 do |env|
|
||||
render_404
|
||||
end
|
||||
end
|
||||
|
||||
# Test environment doesn't need to have signal trap, built-in images, and logging.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue