From 842d4c04f50fbad367ef3d2ebcffa66a982f973d Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Thu, 3 Nov 2022 00:50:54 +0100 Subject: [PATCH] cloudfront: use strings.Equalfold() Minor optimization :) Signed-off-by: Sebastiaan van Stijn --- registry/storage/driver/middleware/cloudfront/s3filter.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/registry/storage/driver/middleware/cloudfront/s3filter.go b/registry/storage/driver/middleware/cloudfront/s3filter.go index 6b02d29d..1ff9829e 100644 --- a/registry/storage/driver/middleware/cloudfront/s3filter.go +++ b/registry/storage/driver/middleware/cloudfront/s3filter.go @@ -94,7 +94,7 @@ func (s *awsIPs) tryUpdate() error { regionAllowed := false if len(s.awsRegion) > 0 { for _, ar := range s.awsRegion { - if strings.ToLower(region) == ar { + if strings.EqualFold(region, ar) { regionAllowed = true break }