Skip to content

Commit

Permalink
Use @env instead of headers to fetch ["HTTP_USER_AGENT"]
Browse files Browse the repository at this point in the history
Co-authored-by: Roman Samoilov <2270393+rsamoilov@users.noreply.github.com>
  • Loading branch information
cuneyter and rsamoilov authored Aug 14, 2024
1 parent 1b0ca3a commit 3d2c088
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rage/request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def fullpath
# @example
# request.user_agent # => "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36"
def user_agent
headers["HTTP_USER_AGENT"]
@env["HTTP_USER_AGENT"]
end

private
Expand Down

0 comments on commit 3d2c088

Please sign in to comment.