Skip to content

Commit

Permalink
shibui-2341 exit upload if api is inaccessible
Browse files Browse the repository at this point in the history
  • Loading branch information
sporth committed Sep 9, 2022
1 parent 7d8b1d8 commit bfeda4f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions bulk-upload/docker-build/shibui-md-upload.pl
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@

#create auth token
$client->HEAD('/');

my $code = $client->responseCode();
my $res = $client->responseContent();
die "$res\n" if ($code != 302 && $code != 200);

my $token = &get_cookie_value($cookies, 'XSRF-TOKEN');
$client->addHeader('X-XSRF-TOKEN', $token);
##
Expand Down

0 comments on commit bfeda4f

Please sign in to comment.