]> git.proxmox.com Git - pve-manager.git/commitdiff
api: query url metadata: change default user-agent to "Proxmox VE"
authorOguz Bektas <o.bektas@proxmox.com>
Tue, 1 Feb 2022 14:02:38 +0000 (15:02 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 4 Feb 2022 16:49:46 +0000 (17:49 +0100)
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>
PVE/API2/Nodes.pm

index d57a19377679710266a6d989d7d9b9f9b59fd1e0..655493a3db8efea475d61e0a7dc8041b8b2241a3 100644 (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}) {