X-Git-Url: https://git.proxmox.com/?p=pve-apiclient.git;a=blobdiff_plain;f=PVE%2FAPIClient%2FLWP.pm;fp=PVE%2FAPIClient%2FLWP.pm;h=2ae8c1a2a96860428ef567bf82d042f3a50a0a18;hp=51112e25a22acea8228aaed9d1fb4423fc852816;hb=444d64191120fb8359844fe2067f934b629c29d6;hpb=bf0c1ca60697edbc5a6d8a6a4635f3a253d10213 diff --git a/PVE/APIClient/LWP.pm b/PVE/APIClient/LWP.pm index 51112e2..2ae8c1a 100755 --- a/PVE/APIClient/LWP.pm +++ b/PVE/APIClient/LWP.pm @@ -87,7 +87,7 @@ sub update_ticket { $self->{ticket} = $ticket; my $encticket = uri_escape($ticket); - my $cookie = "PVEAuthCookie=$encticket; path=/; secure;"; + my $cookie = "$self->{cookie_name}=$encticket; path=/; secure;"; $agent->default_header('Cookie', $cookie); } @@ -290,6 +290,7 @@ sub new { host => $param{host} || 'localhost', port => $param{port}, protocol => $param{protocol}, + cookie_name => $param{cookie_name} // 'PVEAuthCookie', manual_verification => $param{manual_verification}, cached_fingerprints => $param{cached_fingerprints} || {}, verify_fingerprint_cb => $param{verify_fingerprint_cb},