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 }