Image assets and playing nicely with Cloudflare #6487
Unanswered
schwartzmj
asked this question in
Q&A
Replies: 1 comment 3 replies
-
If you use the "cached" setting, there will be extensions. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to get Statamic to play as nice as possible with Cloudflare re: assets.
Static assets work great and get cached easily enough. The issue I'm having is with Glide generated images.
Since there are no file extensions on these image paths, Cloudflare by default will not cache them. While this isn't perfect for this scenario, it's fine. You can just set up a Page Rule in Cloudflare to cache everything in the path of
/img
— except you can't.Laravel / Statamic send back cookies at these image routes, which Cloudflare will never cache. I tested playing around with Middleware on the Laravel side of things and playing with Cloudflare Workers on that side, but wasn't able to figure it out.
I'm no Laravel genius so I could be missing something here. Any ideas for this?
Beta Was this translation helpful? Give feedback.
All reactions