Bug 36700: Update svc to use CSRF-TOKEN
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
parent
e4bb59683f
commit
9dcac6dfe9
2 changed files with 2 additions and 2 deletions
|
@ -106,7 +106,7 @@ sub new {
|
|||
$ua->cookie_jar({});
|
||||
|
||||
my $get_resp = $ua->get("$url/authentication");
|
||||
my $csrf_token = $get_resp->header('X-CSRF-TOKEN');
|
||||
my $csrf_token = $get_resp->header('CSRF-TOKEN');
|
||||
$self->{csrf_token} = $csrf_token;
|
||||
|
||||
my $resp = $ua->post(
|
||||
|
|
|
@ -62,5 +62,5 @@ if ( $status eq "ok" ) {
|
|||
);
|
||||
$csrf_token = Koha::Token->new->generate_csrf( { session_id => scalar $sessionID } );
|
||||
}
|
||||
print $query->header( -type => 'text/xml', cookie => $cookie, -'X-CSRF-TOKEN' => $csrf_token );
|
||||
print $query->header( -type => 'text/xml', cookie => $cookie, -'CSRF-TOKEN' => $csrf_token );
|
||||
print XMLout( { status => $status }, NoAttr => 1, RootName => 'response', XMLDecl => 1 );
|
||||
|
|
Loading…
Reference in a new issue