Skip to content

Commit

Permalink
Ignoring ssl integrity check for assets files
Browse files Browse the repository at this point in the history
  • Loading branch information
MuriloChianfa committed Sep 1, 2024
1 parent efc6447 commit 36ba0a2
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,14 @@ function getRemoteFileSize(string $url): int
}

if (! isset($contentLength)) {
$contentLength = strlen(file_get_contents($url));
$context = stream_context_create([
'ssl' => [
'verify_peer' => false,
'verify_peer_name' => false
],
]);

$contentLength = strlen(file_get_contents($url, false, $context));
}

return $contentLength;
Expand Down

0 comments on commit 36ba0a2

Please sign in to comment.