Skip to content

Commit

Permalink
Recreate REQUEST_URI using Rack SPEC-compliant variables
Browse files Browse the repository at this point in the history
  • Loading branch information
joelvh committed Jul 11, 2020
1 parent 1b739f0 commit 263a0b4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/rollbar/request_data_extractor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ def rollbar_url(env)
host = host.split(',').first.strip unless host.empty?

path = env['ORIGINAL_FULLPATH'] || env['REQUEST_URI']
path ||= "#{env['SCRIPT_NAME']}#{env['PATH_INFO']}#{"?#{env['QUERY_STRING']}" unless env['QUERY_STRING'].to_s.empty?}"
unless path.nil? || path.empty?
path = '/' + path.to_s if path.to_s.slice(0, 1) != '/'
end
Expand Down

0 comments on commit 263a0b4

Please sign in to comment.