Respect base url setting when redirecting

This commit is contained in:
Alex Ling
2020-05-23 10:42:59 +00:00
parent 8658cb8306
commit 60d4cee0a9
5 changed files with 14 additions and 9 deletions

View File

@@ -99,3 +99,8 @@ end
def random_str
UUID.random.to_s.gsub "-", ""
end
def redirect(env, path)
base = Config.current.base_url
env.redirect File.join base, path
end