Skip to content

Commit

Permalink
Merge pull request #4342 from sul-dlss/sfx
Browse files Browse the repository at this point in the history
Set a user-agent header for SFX requests.
  • Loading branch information
dnoneill authored Jul 22, 2024
2 parents 0e019ad + 6a313e5 commit 94a67d0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/models/sfx_data.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ def sfx_response
Faraday.new(url: sfx_url) do |faraday|
faraday.use FaradayMiddleware::FollowRedirects
faraday.adapter Faraday.default_adapter
# Set the user agent
faraday.headers['User-Agent'] = 'Mozilla/5.0 (compatible; +https://searchworks.stanford.edu)'
end.get
rescue Faraday::ConnectionFailed
Honeybadger.notify("SFX data for #{sfx_url} failed to load")
Expand Down

0 comments on commit 94a67d0

Please sign in to comment.