eexit / ghost-storage-cloudinary

:rocket: A fully-featured and deeply tested Cloudinary Ghost storage adapter
https://ghost.org/integrations/cloudinary/
81 stars 21 forks source link

How difficult would it be to proxy all images through the node.js server? #91

Closed ndbroadbent closed 4 years ago

ndbroadbent commented 4 years ago

I'm serving my Ghost blog on a subdirectory on my root domain, so I proxy all the requests through my application server. I also route all the traffic on my root domain through Cloudflare, and set it to cache every request.

I can see that this Ghost plugin is loading the images directly from the cloudinary domain, so this bypasses all of my proxies and caches, and it means I have to be more careful about bandwidth for my image requests. I would prefer to send everything through CloudFlare if possible so that I can cache and serve everything for free.

How difficult would it be to proxy all the image requests through the Node.js server, instead of serving directly from Cloudinary?

I'm thinking that I could return a simple path from the uploader function, e.g. /cloudinary/{image_id}. Then I could set up a handler in serve to respond to the /cloudinary/{image_id} requests.

Would anyone else be interested in a proxyImages option?

ndbroadbent commented 4 years ago

Closing this because I decided to host my blog on Digital Ocean and use the file storage. Sorry to bother you!