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

@@ -15,7 +15,7 @@ class ReaderRouter < Router
# might not have actually read them
page = [page - 2 * IMGS_PER_PAGE, 1].max
env.redirect "/reader/#{title.id}/#{entry.id}/#{page}"
redirect env, "/reader/#{title.id}/#{entry.id}/#{page}"
rescue e
@context.error e
env.response.status_code = 404