11

I'm running a rails app on heroku and recently switched to cloudflare for CDN for asset serving. My understanding was that once I use cloudflare, my assets (ie js,css,images) would be served from cloudflare and not from my own server but in my heroku logs I still see the requests for assets. Do I need to configure something in my rails app like setting the asset_host or something? Thanks.

Harry Jiang
  • 721
  • 6
  • 16

1 Answers1

4

It might be helpful to clarify what CloudFlare caches by default as well (just to make sure you know that not every file extension is automatically cached).

Note: Caching also depends on how many requests we get for the resources before it gets cached (minimum of three).

damoncloudflare
  • 2,079
  • 13
  • 9