From be225e7e0b899c91e64a68d204384813ce8a7ec8 Mon Sep 17 00:00:00 2001 From: Jake MacMullin Date: Tue, 30 Jan 2018 15:30:44 +1100 Subject: [PATCH] Specify the allowed origins properly Specifying the allowed origin as "origin: '*'" does not work (results in an empty string being set for the allowed origins in API Gateway). It seems that they need to be specified as a list. --- posts/2018-01-16-cors-api-gateway-survival-guide.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/posts/2018-01-16-cors-api-gateway-survival-guide.md b/posts/2018-01-16-cors-api-gateway-survival-guide.md index 8a00d303d..a34a9c6ac 100644 --- a/posts/2018-01-16-cors-api-gateway-survival-guide.md +++ b/posts/2018-01-16-cors-api-gateway-survival-guide.md @@ -194,7 +194,8 @@ functions: path: product/{id} method: get cors: - origin: '*' # <-- Specify allowed origin + origins: + - '*' # <-- Specify allowed origin headers: # <-- Specify allowed headers - Content-Type - X-Amz-Date