Skip to content

Commit 4ca933c

Browse files
eilmivCopilot
andauthored
Set user agent when performing OAI-PMH requests.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 15f33d5 commit 4ca933c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/ingestors/oai_pmh_ingestor.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def initialize
1919
end
2020

2121
def read(source_url)
22-
client = OAI::Client.new source_url, headers: { 'From' => config[:mail] }
22+
client = OAI::Client.new source_url, headers: { 'From' => config[:mail], 'User-Agent' => config[:user_agent] }
2323
found_bioschemas = begin
2424
read_oai_rdf(client)
2525
rescue OAI::ArgumentException

0 commit comments

Comments
 (0)