mirror of
https://github.com/hkalexling/Mango.git
synced 2026-04-03 00:03:14 -04:00
- show 403 message
This commit is contained in:
@@ -34,6 +34,11 @@ def hash_to_query(hash)
|
||||
hash.map { |k, v| "#{k}=#{v}" }.join("&")
|
||||
end
|
||||
|
||||
error 403 do |env|
|
||||
message = "You are not authorized to visit #{env.request.path}"
|
||||
layout "message"
|
||||
end
|
||||
|
||||
get "/" do |env|
|
||||
begin
|
||||
titles = library.titles
|
||||
@@ -196,10 +201,6 @@ get "/reader/:title/:entry/:page" do |env|
|
||||
"/reader/#{title.title}/#{entry.title}/#{next_page}"
|
||||
exit_url = "/book/#{title.title}"
|
||||
|
||||
pp "requesting #{page}"
|
||||
pp "serving #{urls}"
|
||||
pp "next url #{next_url}"
|
||||
|
||||
render "src/views/reader.ecr"
|
||||
rescue
|
||||
env.response.status_code = 404
|
||||
|
||||
Reference in New Issue
Block a user