-
Notifications
You must be signed in to change notification settings - Fork 822
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fastly: fix the cache rule for the version markers. #7518
base: main
Are you sure you want to change the base?
Conversation
Related: - kubernetes#7447 We do not capture the latest-1.txt and stable-1.txt due to the regex rule define for all the version markers.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ameukam The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/hold Not exactly sure about this regex rule. how to test it: echo "151.101.0.204 cdn.dl-sandbox.k8s.dev" > /etc/hosts
curl -vvv -H "fastly-debug:1" http://cdn.dl-sandbox.k8s.dev/release/latest-1.txt A cc @BenTheElder |
@@ -45,7 +45,7 @@ sub vcl_fetch { | |||
} | |||
|
|||
# Ensure version markers are not cached at the edge | |||
if (req.url.path ~ "^/release/(latest|stable)(-\d+(\.\d+))?\.txt\z") { | |||
if (req.url.path ~ "^/release/(latest|stable)(-\d+(\.\d+)?)?\.txt\z") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why don't we do:
if (req.url.path ~ "^/release/(latest|stable)(-\d+(\.\d+)?)?\.txt\z") { | |
if (req.url.path ~ "^/release/(latest|stable)([^/]*)\.txt\z") { |
So any top level release file that starts with latest or stable, ends with .txt
Related:
We do not capture the latest-1.txt and stable-1.txt due to the regex
rule define for all the version markers.