mirror of
git://git.proxmox.com/git/pve-apiclient.git
synced 2025-01-03 05:17:58 +03:00
allow to specify cookie_name
This commit is contained in:
parent
bf0c1ca606
commit
444d641911
@ -87,7 +87,7 @@ sub update_ticket {
|
|||||||
$self->{ticket} = $ticket;
|
$self->{ticket} = $ticket;
|
||||||
|
|
||||||
my $encticket = uri_escape($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);
|
$agent->default_header('Cookie', $cookie);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -290,6 +290,7 @@ sub new {
|
|||||||
host => $param{host} || 'localhost',
|
host => $param{host} || 'localhost',
|
||||||
port => $param{port},
|
port => $param{port},
|
||||||
protocol => $param{protocol},
|
protocol => $param{protocol},
|
||||||
|
cookie_name => $param{cookie_name} // 'PVEAuthCookie',
|
||||||
manual_verification => $param{manual_verification},
|
manual_verification => $param{manual_verification},
|
||||||
cached_fingerprints => $param{cached_fingerprints} || {},
|
cached_fingerprints => $param{cached_fingerprints} || {},
|
||||||
verify_fingerprint_cb => $param{verify_fingerprint_cb},
|
verify_fingerprint_cb => $param{verify_fingerprint_cb},
|
||||||
|
Loading…
Reference in New Issue
Block a user