mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-03-16.git
synced 2024-08-15 00:53:18 +00:00
Use error template for 404 and 500
This commit is contained in:
parent
ecb1999795
commit
dc45fbfad6
1 changed files with 5 additions and 3 deletions
|
@ -269,12 +269,14 @@ get "/search" do |env|
|
||||||
templated "search"
|
templated "search"
|
||||||
end
|
end
|
||||||
|
|
||||||
get "/:path" do |env|
|
error 404 do |env|
|
||||||
env.redirect "/"
|
error_message = "404 Page not found"
|
||||||
|
templated "error"
|
||||||
end
|
end
|
||||||
|
|
||||||
error 500 do |env|
|
error 500 do |env|
|
||||||
templated "index"
|
error_message = "500 Server error"
|
||||||
|
templated "error"
|
||||||
end
|
end
|
||||||
|
|
||||||
public_folder "assets"
|
public_folder "assets"
|
||||||
|
|
Loading…
Reference in a new issue