Skip to content

Commit

Permalink
Merge 2b7f505 into 86c19fc
Browse files Browse the repository at this point in the history
  • Loading branch information
ArthurWD committed Jun 18, 2020
2 parents 86c19fc + 2b7f505 commit 8d2d090
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/better_errors/error_page.rb
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def rails_params
end

def uri_prefix
env["SCRIPT_NAME"] || ""
BetterErrors::Middleware.internal_url_prefix + (env["SCRIPT_NAME"] || "")
end

def request_path
Expand Down
8 changes: 8 additions & 0 deletions lib/better_errors/middleware.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@ def self.allow_ip!(addr)
allow_ip! "127.0.0.0/8"
allow_ip! "::1/128" rescue nil # windows ruby doesn't have ipv6 support

def self.internal_url_prefix
@internal_url_prefix || ""
end

def self.internal_url_prefix=(value)
@internal_url_prefix = value
end

# A new instance of BetterErrors::Middleware
#
# @param app The Rack app/middleware to wrap with Better Errors
Expand Down

0 comments on commit 8d2d090

Please sign in to comment.