Skip to content

Commit 23fa3e5

Browse files
committed
lowercase header check
1 parent e4b12f0 commit 23fa3e5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/api/lambda.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const handler = async (event: APIGatewayEvent, context: Context) => {
2020
// check that the request has the right header (coming from cloudfront)
2121
if (
2222
!event.headers ||
23-
!(event.headers["X-Origin-Verify"] === process.env.ORIGIN_VERIFY_KEY)
23+
!(event.headers["x-origin-verify"] === process.env.ORIGIN_VERIFY_KEY)
2424
) {
2525
const newError = new ValidationError({
2626
message: "Request is not valid.",

0 commit comments

Comments
 (0)