feat: limit redirections to Google Cloud CDN based on a feature flag
As part of https://gitlab.com/groups/gitlab-org/-/epics/7212, we added support for Google Cloud CDN to the Container Registry (https://gitlab.com/gitlab-org/container-registry/-/issues/535).
In order to enable a percentage based rollout, this MR introduces a change so that if Google Cloud CDN is enabled, redirections to CDN for HEAD
and GET
requests for blobs will only occur if the JWT token in the request
carries a cdn_redirect
flag sent by GitLab Rails, which is controlled with a feature flag.
Please see the description of https://gitlab.com/gitlab-org/gitlab/-/issues/349417 for additional context.
Edited by João Pereira