mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-04-11.git
synced 2024-08-15 00:43:26 +00:00
Add support for redirect in URL description
This commit is contained in:
parent
fc2e10a54f
commit
cf9931e2a1
1 changed files with 8 additions and 0 deletions
|
@ -334,6 +334,14 @@ get "/search" do |env|
|
||||||
templated "search"
|
templated "search"
|
||||||
end
|
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 404 do |env|
|
||||||
error_message = "404 Page not found"
|
error_message = "404 Page not found"
|
||||||
templated "error"
|
templated "error"
|
||||||
|
|
Loading…
Reference in a new issue