csvbase icon indicating copy to clipboard operation
csvbase copied to clipboard

Avatars not getting cached by CDN

Open calpaterson opened this issue 1 year ago • 0 comments

Description

User avatars should be cached for 5 minutes, including by the CDN.

Instead cloudflare views them as dynamic (cf-cache-status: DYNAMIC) and every request is going through to the app server

Steps to reproduce

  1. curl https://csvbase.com/avatars/calpaterson

Expected result

cf-cache-status is HIT or MISS, depending on situation at the CDN

Actual result

cf-cache-status is DYNAMIC, meaning that they queried origin

Additional details

Apparently this is about file extensions or something.

Cloudflare has been configured with a quick hack to ensure this doesn't happen in production, but clearly some kind of code change is needed

calpaterson avatar Sep 20 '24 07:09 calpaterson