Skip to content

feat: suppress caching for added project hosts via Cache-Control override#797

Closed
davidnuescheler wants to merge 9 commits intomainfrom
feature/cache-control-added-projects
Closed

feat: suppress caching for added project hosts via Cache-Control override#797
davidnuescheler wants to merge 9 commits intomainfrom
feature/cache-control-added-projects

Conversation

@davidnuescheler
Copy link
Contributor

Suppresses caching for added project hosts (especially prod) by overriding response headers via the extension's declarativeNetRequest rules.

  • Cache-Control override: For every added project, responses from its prod host, preview host, live host, and review host get Cache-Control: max-age=60 (1 minute), overriding the server's HTML/JSON cache headers.
  • Scope: Applies to GET requests for main_frame, sub_frame, xmlhttprequest, and other (covers HTML and JSON).
  • Config: CACHE_MAX_AGE_SECONDS (default 60) is exported from auth.js for easy tuning.
  • Lifecycle: Header rules are applied at startup and whenever a project is added or updated (and when projects are removed via existing auth reconfig).

rofe and others added 9 commits September 7, 2025 15:01
…ride

- Add declarativeNetRequest rules that set response header
  Cache-Control: max-age=60 for all added project hosts (prod,
  preview, live, review)
- Overrides server Cache-Control for HTML (main_frame, sub_frame)
  and JSON (xmlhttprequest) to 1 minute
- Re-apply header config when project is added or updated
@codecov
Copy link

codecov bot commented Feb 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@davidnuescheler davidnuescheler deleted the feature/cache-control-added-projects branch February 11, 2026 17:33
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