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

fix: ensure Cache-Control is specified in 304 response #971

Merged
merged 2 commits into from Jan 12, 2022

Conversation

zone117x
Copy link
Member

@zone117x zone117x commented Jan 12, 2022

Fixes caching issue with certain CDNs (e.g. Cloudflare) where intermediate caching will only be performed if the 304 CACHE OK response also includes the Cache-Control headers.

Cloudflare will perform intermediate caching when the following page rules are applied for /v1/extended/*:
image

@codecov-commenter
Copy link

codecov-commenter commented Jan 12, 2022

Codecov Report

Merging #971 (0722a97) into master (64a4401) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #971      +/-   ##
==========================================
+ Coverage   66.88%   66.90%   +0.01%     
==========================================
  Files          95       95              
  Lines       10036    10040       +4     
  Branches     1573     1623      +50     
==========================================
+ Hits         6713     6717       +4     
  Misses       3319     3319              
  Partials        4        4              
Impacted Files Coverage Δ
src/api/controllers/cache-controller.ts 96.61% <100.00%> (+0.05%) ⬆️
src/api/init.ts 82.38% <100.00%> (+0.27%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 887b7d6...0722a97. Read the comment docs.

@github-actions
Copy link

github-actions bot commented Jan 12, 2022

@github-actions github-actions bot temporarily deployed to pull request January 12, 2022 16:40 Inactive
Copy link
Collaborator

@rafaelcr rafaelcr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@github-actions github-actions bot temporarily deployed to pull request January 12, 2022 16:47 Inactive
@github-actions github-actions bot temporarily deployed to commit January 12, 2022 16:47 Inactive
Copy link
Member

@CharlieC3 CharlieC3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@zone117x zone117x merged commit a0fd2fe into master Jan 12, 2022
@zone117x zone117x deleted the hotfix/fix-cdn-caching branch January 12, 2022 18:36
blockstack-devops pushed a commit that referenced this pull request Jan 12, 2022
## [1.0.7](v1.0.6...v1.0.7) (2022-01-12)

### Bug Fixes

* ensure `Cache-Control` is specified in 304 response as required by some CDNs to cache properly ([#971](#971)) ([a0fd2fe](a0fd2fe))
@blockstack-devops
Copy link

🎉 This PR is included in version 1.0.7 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants