Skip to content

fix: use no cache for /object/info endpoint to prevent stale metadata#821

Open
7ttp wants to merge 2 commits intosupabase:masterfrom
7ttp:fix/endpoint-cache-control
Open

fix: use no cache for /object/info endpoint to prevent stale metadata#821
7ttp wants to merge 2 commits intosupabase:masterfrom
7ttp:fix/endpoint-cache-control

Conversation

@7ttp
Copy link
Copy Markdown

@7ttp 7ttp commented Dec 31, 2025

Problem

The /object/info endpoint was using the object's Cache-Control metadata (e.g., max-age=3600) as the HTTP response header. This caused browsers/CDNs to cache the info response, returning stale metadata after upserts.

Solution

Changed the Cache-Control header to no-cache so clients always revalidate with the server before using cached responses.

related

Edit (saw this old pr) :
not sure if this is the right fix, if not would be happy to document it as needed :)

@7ttp 7ttp requested a review from a team as a code owner April 10, 2026 21:32
@coveralls
Copy link
Copy Markdown

Coverage Report for CI Build 24265131222

Coverage increased (+0.002%) to 80.838%

Details

  • Coverage increased (+0.002%) from the base build.
  • Patch coverage: 1 of 1 lines across 1 file are fully covered (100%).
  • 3 coverage regressions across 1 file.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

3 previously-covered lines in 1 file lost coverage.

File Lines Losing Coverage Coverage
src/storage/protocols/tus/s3-locker.ts 3 88.57%

Coverage Stats

Coverage Status
Relevant Lines: 37381
Covered Lines: 30392
Line Coverage: 81.3%
Relevant Branches: 4150
Covered Branches: 3181
Branch Coverage: 76.65%
Branches in Coverage %: Yes
Coverage Strength: 319.46 hits per line

💛 - Coveralls

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.

/object/info is cached and the cache not busted after upserting

2 participants