From 1b3d8f174522ff151635484fc938865751804c3c Mon Sep 17 00:00:00 2001 From: Nicholas Elliott Date: Wed, 11 Sep 2024 17:08:27 -0400 Subject: [PATCH] Default to not strictly validating a payload --- src/lambda.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lambda.ts b/src/lambda.ts index f225702..28848c7 100644 --- a/src/lambda.ts +++ b/src/lambda.ts @@ -27,7 +27,8 @@ const logger = winston.createLogger({ let SECRETS = { GOOGLEAPIKEY: process.env.GOOGLEAPIKEY, - STORAGE_BUCKET: process.env.STORAGE_BUCKET + STORAGE_BUCKET: process.env.STORAGE_BUCKET, + VALIDATE_API_PAYLOADS: undefined } @@ -91,7 +92,7 @@ export const handler: Handler = async (event: APIGatewayProxyEventV2, context): // Create the controller that'll actually process the request. const server = new PdfController(logger, { GoogleApiKey: SECRETS.GOOGLEAPIKEY ?? 'UNKNOWN', - ValidateApiPayloads: true + ValidateApiPayloads: SECRETS.VALIDATE_API_PAYLOADS }); const result = await server.process(event.body!);