-
Task
-
Resolution: Released
-
Should have
-
None
-
5
-
Performance
-
Sprint #147, Sprint #148, Sprint #149
Based on PLANET-2648 we want to "mask" storage.googleapis.com buckets urls to our own domain. This is extra important with Cloudflare, because we are missing the opportunity to serve these images through Cloudflare Edge servers. Instead we serve them from a US-located bucket. This results in significant slow responses for many regions away from US.
The way some people deal with that is use a CNAME. But in order for that to work with https you need to set up a load balancer in GCP for each bucket. That doesn't scale for us, since we use a different bucket for each instance, so we would need to use a different CNAME for each one of them.
A simpler workaround is to use a worker and proxy GCP buckets domain. Besides the obvious benefits, this also allows us to use some free image optimizations features in Cloudflare, that only work on images that come from the same domain as the website.
Tasks
- Create a new worker to be applied in www.greenpeace.net/static* that will proxy the requests to storage.googleapis.com.
- The end result would be that an image that is accessible from storage.googleapis.com/planet4-<nro>
stateless/<slug>.jpgwill also be available from www.greenpeace.org/static/planet4<nro>-stateless/<slug>.jpg - Adjust the relevant setting ("File URL") in Stateless settings in all NRO websites. This may require flushing the cache.
- duplicates
-
PLANET-2648 URLs: custom CDN domain name to allow URLs customisation of files
- CLOSED
- relates to
-
PLANET-2648 URLs: custom CDN domain name to allow URLs customisation of files
- CLOSED