From 6f66c3972461f7d20b3476c1467ba1b83b182d46 Mon Sep 17 00:00:00 2001 From: Dave <62899351+davidclaveau@users.noreply.github.com> Date: Thu, 18 Jul 2024 15:09:25 -0700 Subject: [PATCH] remove authorizer for /config, fix broken test (#360) --- arSam/layers/baseLayer/baseLayer.js | 2 +- arSam/template.yaml | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/arSam/layers/baseLayer/baseLayer.js b/arSam/layers/baseLayer/baseLayer.js index 49c46d7..a9c04f7 100644 --- a/arSam/layers/baseLayer/baseLayer.js +++ b/arSam/layers/baseLayer/baseLayer.js @@ -30,7 +30,7 @@ const sendResponse = function (code, data, context) { 'Content-Type': 'application/json', 'Access-Control-Allow-Headers': 'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token', 'Access-Control-Allow-Origin': '*', - 'Access-Control-Allow-Methods': 'OPTIONS,GET,POST,PUT' + 'Access-Control-Allow-Methods': 'OPTIONS,GET,POST,PUT,DELETE' }, body: JSON.stringify(data) }; diff --git a/arSam/template.yaml b/arSam/template.yaml index 258e3ae..6949e0a 100644 --- a/arSam/template.yaml +++ b/arSam/template.yaml @@ -663,13 +663,19 @@ Resources: Path: /config Method: GET RestApiId: !Ref ApiDeployment + Auth: + Authorizer: NONE + OverrideApiAuth: true readConfigOptions: Type: Api Properties: Path: /config Method: OPTIONS RestApiId: !Ref ApiDeployment - + Auth: + Authorizer: NONE + OverrideApiAuth: true + SubAreaGetFunction: Type: AWS::Serverless::Function Properties: