Skip to content

Commit

Permalink
Merge pull request #97 from cego/mawo/less-strict-image-check
Browse files Browse the repository at this point in the history
mawo/less-strict-image-check
  • Loading branch information
mawocego authored Jan 3, 2024
2 parents bd28773 + 0283648 commit 82d0786
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/RequestInsurance/HttpResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,9 @@ public function isInconsistent(): bool
public function isImageResponse(): bool
{
return collect($this->getHeaders()
->keyBy(fn ($value, $key) => strtolower($key))
->get('content-type', []))
->filter(fn ($type) => str_starts_with($type, 'image/'))
->filter(fn ($type) => str_starts_with($type, 'image'))
->isNotEmpty();
}

Expand Down

0 comments on commit 82d0786

Please sign in to comment.