Skip to content

Revert "feat(proxy): add cacheControl override; force immutable on VTEX /files/*?v=* (#1590)" - #1594

Merged
aka-sacci-ccr merged 1 commit into
mainfrom
revert/proxy-cache-control
May 21, 2026
Merged

Revert "feat(proxy): add cacheControl override; force immutable on VTEX /files/*?v=* (#1590)"#1594
aka-sacci-ccr merged 1 commit into
mainfrom
revert/proxy-cache-control

Conversation

@aka-sacci-ccr

@aka-sacci-ccr aka-sacci-ccr commented May 21, 2026

Copy link
Copy Markdown
Contributor

Reverts 7e17085 (PR #1590).

🤖 Generated with Claude Code


Summary by cubic

Revert the proxy Cache-Control override feature, removing the forced immutable caching for VTEX versioned static assets. Proxied responses now follow upstream Cache-Control headers again.

Written for commit 9aa23d1. Summary will update on new commits. Review in cubic

Summary by CodeRabbit

  • Changes
    • Proxy routing now targets hostname-based upstream servers instead of CDN domains, affecting request routing and response handling.
    • Removed automatic cache-control header injection for versioned static assets. Previously, static files with version parameters received extended cache headers; this behavior is now removed, potentially affecting browser caching behavior.

Review Change Stack

@github-actions

Copy link
Copy Markdown
Contributor

Tagging Options

Should a new tag be published when this PR is merged?

  • 👍 for Patch 0.151.2 update
  • 🎉 for Minor 0.152.0 update
  • 🚀 for Major 1.0.0 update

@coderabbitai

coderabbitai Bot commented May 21, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 3c0209c2-5e8e-41d7-92be-643e4a1980ef

📥 Commits

Reviewing files that changed from the base of the PR and between 7e17085 and 9aa23d1.

📒 Files selected for processing (2)
  • vtex/loaders/proxy.ts
  • website/handlers/proxy.ts
💤 Files with no reviewable changes (2)
  • vtex/loaders/proxy.ts
  • website/handlers/proxy.ts

📝 Walkthrough

Walkthrough

This PR removes the cacheControl option from the proxy handler's Props interface and implementation across two files. The VTEX loader's upstream proxy URL is updated to use the provided hostname, and immutable asset caching logic for versioned VTEX static assets is removed.

Changes

Proxy cache-control removal

Layer / File(s) Summary
Remove cache-control from proxy handler
website/handlers/proxy.ts
The Props interface no longer defines cacheControl, the handler's destructuring removes the field, and the conditional logic that set overridden Cache-Control headers on proxied responses is deleted.
Update VTEX loader proxy and remove immutable asset caching
vtex/loaders/proxy.ts
The upstream proxy URL is updated to https://${hostname} (and hostToUse similarly uses hostname). The conditional logic that applied public, max-age=31536000, immutable cache headers for versioned asset paths matching /files/*, /assets/*, and /arquivos/* with a v query parameter is removed.

Possibly related PRs

  • deco-cx/apps#1590: Directly reversed—this PR removes the cacheControl override logic and immutable asset path wiring that PR #1590 added.
  • deco-cx/apps#1587: Conflicts at the same code paths in both files; this PR removes cache-control override logic while PR #1587 adds opt-in per-pattern overrides.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 Cache headers dance away,
No more immutable to stay,
VTEX routes now bare and plain,
Upstream host takes the reign,
Simpler proxies, clean and light!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive The description explains the revert and its effects but lacks required template sections like Issue Link and Demonstration Link from the repository template. Add the Issue Link section (linking to issue #1590) and consider adding a Demonstration Link or Testing section to complete the template structure.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the primary change: reverting a previous proxy cache control feature implementation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch revert/proxy-cache-control

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@aka-sacci-ccr
aka-sacci-ccr merged commit cdec21e into main May 21, 2026
6 of 7 checks passed
@aka-sacci-ccr
aka-sacci-ccr deleted the revert/proxy-cache-control branch May 21, 2026 18:57
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.

1 participant