Skip to content

Invidious is an alternative front-end to YouTube

Fix error handling

Omar Rotha9ef931856e5
diff --git a/src/invidious.cr b/src/invidious.cr
index e103903c..b23dfe5b 100644
--- a/src/invidious.cr
+++ b/src/invidious.cr
@@ -242,12 +242,12 @@ get "/search" do |env|
templated "search"
end
-error 404 do |env|
- templated "index"
+get "/:path" do |env|
+ env.redirect "/"
end
error 500 do |env|
- templated "index"
+ "Error 500"
end
public_folder "assets"