Skip to content

Commit 8286243

Browse files
committed
style: fix function name
1 parent 1f6cb8f commit 8286243

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/resty/aws/init.lua

+3-3
Original file line numberDiff line numberDiff line change
@@ -260,15 +260,15 @@ do
260260
end
261261

262262

263-
local isRegionalSTSDomain do
263+
local is_regional_sts_domain do
264264
-- from the list described in https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html
265265
-- TODO: not sure if gov cloud also has their own endpoints so leave it for now
266266
local stsRegionRegexes = {
267267
[[sts\.(us|eu|ap|sa|ca|me)\-\w+\-\d+\.amazonaws\.com$]],
268268
[[sts\.cn\-\w+\-\d+\.amazonaws\.com\.cn$]],
269269
}
270270

271-
function isRegionalSTSDomain(domain)
271+
function is_regional_sts_domain(domain)
272272
for _, entry in ipairs(stsRegionRegexes) do
273273
if ngx.re.match(domain, entry, "jo") then
274274
return true
@@ -352,7 +352,7 @@ local function generate_service_methods(service)
352352
-- If the endpoint is a VPC endpoint DNS hostname, or a regional STS domain, then we don't need to inject the region
353353
-- VPC endpoint DNS hostnames always contain region, see
354354
-- https://docs.aws.amazon.com/vpc/latest/privatelink/privatelink-access-aws-services.html#interface-endpoint-dns-hostnames
355-
if not service.config.endpoint:match(AWS_VPC_ENDPOINT_DOMAIN_PATTERN) and not isRegionalSTSDomain(service.config.endpoint) then
355+
if not service.config.endpoint:match(AWS_VPC_ENDPOINT_DOMAIN_PATTERN) and not is_regional_sts_domain(service.config.endpoint) then
356356
local pre, post = service.config.endpoint:match(AWS_PUBLIC_DOMAIN_PATTERN)
357357
service.config.endpoint = pre .. "." .. service.config.region .. post
358358
end

0 commit comments

Comments
 (0)