Skip to content

Commit

Permalink
fixes header check for serverless env
Browse files Browse the repository at this point in the history
  • Loading branch information
UtkuDalmaz authored and jdavidbakr committed Feb 6, 2024
1 parent 7680132 commit fa065fd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/SNSController.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public function callback(Request $request)
// get body from request
$body = $request->getContent();

// Make sure the SNS-provided header exists.
$messageType = $request->header('x-amz-sns-message-type');
if (!$messageType) {
throw new \RuntimeException('SNS message type header not provided.');
Expand Down

0 comments on commit fa065fd

Please sign in to comment.