Skip to content
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

TNT-49972 - Fix ODD rules request proxy caching issue #77

Merged
merged 3 commits into from
Jun 18, 2024

Conversation

dcottingham
Copy link
Contributor

@dcottingham dcottingham commented Jun 13, 2024

Description

Added new ODD configuration option (shouldArtifactRequestBypassProxyCache). When enabled and a proxy is configured, send empty Authorization header on artifact rules request to bypass proxy-level cache.
Even though this request does not require an Authorization header, it's a workaround to bypass the proxy cache since proxies know not to cache responses for authorized requests.

Related Issue

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@jasonwaters
Copy link
Contributor

@dcottingham when shouldArtifactRequestBypassProxyCache is set to true, does it mean that every artifact request will have the Authorization header and therefore there will never be caching? If so, maybe it makes more sense to rename the property to something like disableOddArtifactCache? 🤷‍♂️

I still think this customer should just fix their caching issues internally. but it's not a hill i'll die on.

@dcottingham
Copy link
Contributor Author

@dcottingham when shouldArtifactRequestBypassProxyCache is set to true, does it mean that every artifact request will have the Authorization header and therefore there will never be caching? If so, maybe it makes more sense to rename the property to something like disableOddArtifactCache? 🤷‍♂️

I still think this customer should just fix their caching issues internally. but it's not a hill i'll die on.

Yes, every request will include the Authorization header and there won't be any caching inside the customer's proxy, but Akamai will still do caching based on the Etag mechanism. That's why I was more explicit with the naming. But if you think it's more clear to name it disableOddArtifactCache I can do that.

@jasonwaters
Copy link
Contributor

fine by me if you want to merge this

@dcottingham dcottingham merged commit b8b7ebb into adobe:main Jun 18, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants