api: query url metadata: change default user-agent to "Proxmox VE"

To avoid being blacklisted because of the default, quite popular,
libwww-perl user-agent like reported in community forum [0].

[0]: https://forum.proxmox.com/threads/104081/

Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
Tested-by: Matthias Heiserer <m.heiserer@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Oguz Bektas 2022-02-01 15:02:38 +01:00 committed by Thomas Lamprecht
parent 38496d8758
commit dfde1eec16

View File

@ -1551,6 +1551,7 @@ __PACKAGE__->register_method({
my $url = $param->{url};
my $ua = LWP::UserAgent->new();
$ua->agent("Proxmox VE");
my $dccfg = PVE::Cluster::cfs_read_file('datacenter.cfg');
if ($dccfg->{http_proxy}) {