From a687fcce74a06312e02af25f275492079e5dc6ed Mon Sep 17 00:00:00 2001 From: John Salter Date: Wed, 10 Aug 2022 12:07:35 +0100 Subject: [PATCH] Change default user agent to prevent 403 responses from Altmetric API --- cgi/altmetric | 1 + 1 file changed, 1 insertion(+) diff --git a/cgi/altmetric b/cgi/altmetric index 21d8b80..bd92e1f 100644 --- a/cgi/altmetric +++ b/cgi/altmetric @@ -11,6 +11,7 @@ my $alt_type = $repo->param( 'id_type' ) or exit; my $alt_id = $repo->param( 'id' ) or exit; my $ua = LWP::UserAgent->new(); +$ua->agent( 'eprints/' . EPrints->human_version ); if( EPrints::Utils::is_set( $ENV{HTTP_proxy} ) ) {