Skip to content

Commit 4cf652f

Browse files
authored
Merge pull request #6980 from BenTheElder/no-capture-groups
implement regex without capture groups, which are not permitted
2 parents 1356aeb + 2ead9d5 commit 4cf652f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

infra/gcp/terraform/modules/oci-proxy/cloud-armor.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ resource "google_compute_security_policy" "cloud-armor" {
7676
# OCI pull / list calls: /v2/<name>/(blobs|manifests|tags)/<reference>
7777
# https://github.com/opencontainers/distribution-spec/blob/main/spec.md#endpoints
7878
# NOTE: AR doesn't support referrers API
79-
expression = "!request.path.matches('(?:^/?$)|(?:^/privacy$)|(?:^/v2/?$)|(?:^/v2/.+/(:?blobs|manifests|tags)/.+$)')"
79+
expression = "!request.path.matches('^/$|^/privacy$|^/v2/?$|^/v2/.+/blobs/.+$|^/v2/.+/manifests/.+$|^/v2/.+/tags/.+$')"
8080
}
8181
}
8282
}

0 commit comments

Comments
 (0)