From 444d64191120fb8359844fe2067f934b629c29d6 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Thu, 6 Apr 2017 11:03:41 +0200 Subject: [PATCH] allow to specify cookie_name --- PVE/APIClient/LWP.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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}, -- 2.39.2