From f944b6f1c9f81a95eed5be594a64bbdd3211d46d Mon Sep 17 00:00:00 2001 From: Michal Migurski Date: Wed, 27 Jul 2022 11:15:16 -0700 Subject: [PATCH] Add CORS response header --- serverless/aws/lambda_function.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/serverless/aws/lambda_function.py b/serverless/aws/lambda_function.py index a20f586..370719d 100644 --- a/serverless/aws/lambda_function.py +++ b/serverless/aws/lambda_function.py @@ -77,7 +77,10 @@ def lambda_handler(event, context): else: raise e - headers = {"Content-Type": "application/protobuf"} + headers = { + "Content-Type": "application/protobuf", + "Access-Control-Allow-Origin": "*", + } if reader.header().metadata.get("compression") == "gzip": if is_api_gateway: