Skip to content

fix(skins): keep owner skin files out of Cloudflare's cache - #217

Merged
ryanbarlow97 merged 1 commit into
mainfrom
fix/owner-files-uncached
Oct 12, 2026
Merged

ryanbarlow97 merged 1 commit into
mainfrom
fix/owner-files-uncached

Conversation

@ryanbarlow97

Copy link
Copy Markdown
Contributor

Follow-up to #216. Cloudflare caches any path ending in .png by URL alone, so an error from GET /skins/submissions/{id}/files/{name}.png (an expired session's 401, say) was handed to the owner's later requests for four hours, and the skin page fell back to its static picture. Seen on Dev: a test 404 came back with age: 61, cache-control: max-age=14400. The file name is now a query parameter (/files?name=), which Cloudflare passes to the origin. The drink texture route has no extension and is unaffected.

Tests: test_skin_owner_files.py, path traversal, Profile and skins frontend tests pass.

🤖 Generated with Claude Code

Cloudflare caches any path ending in .png by URL alone, so a 401 or 404
from /skins/submissions/{id}/files/{name}.png was served to the owner's
later requests for four hours. The file name is now a query parameter
(/files?name=), which Cloudflare leaves to the origin.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 12, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 47 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 67e98d18-9630-4fcf-994b-4fd9512ba921

📥 Commits

Reviewing files that changed from the base of the PR and between 4e3396e and 39a04e5.


📒 Files selected for processing (3)
  • backend/src/api/skins_routes.py
  • backend/src/api/test_skin_owner_files.py
  • frontend/lib/skins/api.ts

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@ryanbarlow97
ryanbarlow97 merged commit fd88fa0 into main Oct 12, 2026
6 checks passed
@ryanbarlow97
ryanbarlow97 deleted the fix/owner-files-uncached branch October 12, 2026 15:49

This branch was successfully deployed

1 active deployment
preview — 39a04e5c Deployed Oct 12, 2026 by ryanbarlow97 via deploy #372
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