We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents bd624ae + 8684d05 commit 7499bfaCopy full SHA for 7499bfa
src/Controllers/AwsSnsController.php
@@ -5,6 +5,7 @@
5
use Aws\Sns\Exception\InvalidSnsMessageException;
6
use Aws\Sns\Message;
7
use Aws\Sns\MessageValidator;
8
+use Illuminate\Support\Facades\Cache;
9
use JoggApp\AwsSns\Events\SnsMessageReceived;
10
use JoggApp\AwsSns\Events\SnsTopicSubscriptionConfirmed;
11
@@ -14,7 +15,11 @@ public function __invoke()
14
15
{
16
$message = Message::fromRawPostData();
17
- $validator = new MessageValidator();
18
+ $validator = new MessageValidator(function ($certUrl) {
19
+ return Cache::rememberForever($certUrl, function () use ($certUrl) {
20
+ return file_get_contents($certUrl);
21
+ });
22
23
24
try {
25
$validator->validate($message);
0 commit comments