From 372f71864dd31e11594a546d3170b48239ef697e Mon Sep 17 00:00:00 2001 From: Stephen Date: Wed, 16 Dec 2020 13:40:42 -0500 Subject: [PATCH 1/2] Additional region pattern for s3 urls --- lib/resty/aws.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/resty/aws.lua b/lib/resty/aws.lua index 59a2533..ee2b85c 100644 --- a/lib/resty/aws.lua +++ b/lib/resty/aws.lua @@ -90,6 +90,7 @@ local function get_service_and_region(host) local patterns = { {'s3.amazonaws.com', 's3', 'us-east-1'}, {'s3-external-1.amazonaws.com', 's3', 'us-east-1'}, + {'s3%.([a-z0-9-]+)%.amazonaws%.com', 's3', nil} {'s3%-([a-z0-9-]+)%.amazonaws%.com', 's3', nil} } From 6fefdfcd398a4d26dd2046121ef80f603f8a056e Mon Sep 17 00:00:00 2001 From: Stephen Date: Wed, 16 Dec 2020 13:41:52 -0500 Subject: [PATCH 2/2] missing , --- lib/resty/aws.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/resty/aws.lua b/lib/resty/aws.lua index ee2b85c..03c7acb 100644 --- a/lib/resty/aws.lua +++ b/lib/resty/aws.lua @@ -90,7 +90,7 @@ local function get_service_and_region(host) local patterns = { {'s3.amazonaws.com', 's3', 'us-east-1'}, {'s3-external-1.amazonaws.com', 's3', 'us-east-1'}, - {'s3%.([a-z0-9-]+)%.amazonaws%.com', 's3', nil} + {'s3%.([a-z0-9-]+)%.amazonaws%.com', 's3', nil}, {'s3%-([a-z0-9-]+)%.amazonaws%.com', 's3', nil} }