Remove CSRF handling

This was required at some point in the past, but it appears to no longer be necessary!
This commit is contained in:
Tianon Gravi 2024-03-08 12:32:14 -08:00
parent 0fbb81005b
commit e1f232931d
1 changed files with 0 additions and 10 deletions

10
push.pl
View File

@ -50,18 +50,8 @@ die 'login failed: ' . $login->res->error->{message} unless $login->res->is_succ
my $token = $login->res->json->{token};
my $csrf;
for my $cookie (@{ $login->res->cookies }) {
if ($cookie->name eq 'csrftoken') {
$csrf = $cookie->value;
last;
}
}
die 'missing CSRF token' unless defined $csrf;
my $authorizationHeader = {
Authorization => "JWT $token",
'X-CSRFToken' => $csrf,
};
my $supportedTagsRegex = qr%^(# Supported tags and respective `Dockerfile` links\n\n)(.*?\n)(?=# |\[)%ms;