mirror of
https://github.com/iv-org/invidious.git
synced 2024-12-13 01:34:40 -05:00
Add support for redirect in URL description
This commit is contained in:
parent
fc2e10a54f
commit
cf9931e2a1
@ -334,6 +334,14 @@ get "/search" do |env|
|
||||
templated "search"
|
||||
end
|
||||
|
||||
get "/redirect" do |env|
|
||||
if env.params.query["q"]?
|
||||
env.redirect env.params.query["q"]
|
||||
else
|
||||
env.redirect "/"
|
||||
end
|
||||
end
|
||||
|
||||
error 404 do |env|
|
||||
error_message = "404 Page not found"
|
||||
templated "error"
|
||||
|
Loading…
Reference in New Issue
Block a user