Are static sites hosted on google cloud storage accessable through https? - google-cloud-storage

According to this post from 2014, https is not available to static sites on google cloud engine: https://stackoverflow.com/a/22767544/46799
Is this still the case? If so, are there any plans add this functionality?
My site is hosted on GCS and I have a cname entry which maps my url to a bucket on GCS. I need to start providing access to the site through https now, am I out of luck?

This is still the case, sorry. You can access GCS via HTTPS, but not via CNAME redirects.

Related

Cloudflare CDN for Google Cloud Storage Bucket

I have a custom domain (cdnexample.com) and a Firebase Google Cloud Storage Bucket (examplefiles.appspot.com).
I want to configure cdnexample.com domain in Cloudflare CDN to source from GCS bucket (examplefiles.appspot.com).
For example, given a GCS File: https://storage.googleapis.com/examplefiles.appspot.com/image1.jpg I want to get the Cloudflare CDN File working: https://cdnexample.com/image1.jpg
The problem is that I cannot change the GCS bucket name (examplefiles.appspot.com) to match my Cloudflare domain name (cdnexample.com). All the solutions I came across below require the GCS bucket name to match Cloudflare domain name and use CNAME configuration with c.storage.googleapis.com.
I have read through the following relevant articles:
https://cloud.google.com/storage/docs/request-endpoints
https://devopsdirective.com/posts/2020/10/gcs-cloudflare-hosting/
https://community.cloudflare.com/t/using-cloudflare-cdn-https-with-google-cloud-storage/15602
How to cache google cloud storage (GCS) with cloudflare?
Using Cloudflare CDN + HTTPS with Google Cloud Storage
Use CloudFlare to CDN a Google Cloud Storage Bucket
https://medium.com/#pablo.delvalle.cr/cloudflare-and-google-cloud-for-hosting-a-static-site-fd2e1a97aa9b
Does anyone have an idea of how to make the Cloudflare CDN work in this case?
In this case you can set up a load balancer with backend bucket which will connect your storage bucket and can be accessed with an IP address, later you point the IP address in your custom domain. you can find the below information about adding a backend bucket here

Restrict access to Google Cloud Storage hosted website

We have a production website running on a host e.g. domain.com
We gonna use haproxy to proxy requests from domain.com to static.domain.com - which is a domain-named bucket in Cloud Storage. Also we have a development version which is also served on Cloud Storage at static.dev.domain.com.
So it turns out that the same page will be available on 3 different domains, which is very bad from the SEO perspective.
My initial idea was to restrict access to domain-named buckets by IP but I see no way to do it. No way for basic http authorization either. Any ideas how to protect static web sites from being indexed?
Actually, it is not possible to restrict the access to one IP from the Cloud Storage console, nevertheless, I found this Public Issue Tracker that requests the restriction of a bucket access by an IP Address. As a recommendation, I suggest you to do a comment and start the issue so you can get notifications about this.
On the other hand, I think that this StackOverflow post could helps you since this one mentions a possible workaround using VPC Service Controls :)
Since my main concern was SEO, to solve duplicate content issue I added canonical url:
<link rel="canonical" href="https://example.com">

Azure CDN Verizon Standard can't see rules engine and need to forward http to https

I have a static web site hosted on blob storage in Azure. I create an Azure CDN profile using Verizon standard account. I need to forward http requests to https automatically. I see a bunch of articles showing how ot do this with the rules engine but I cant seem to access it on my endpoint.

Use CloudFlare to CDN a Google Cloud Storage Bucket

I've heard many good things about Cloudflare, and they have an excellent CDN product that features functionality not found on competitors (HTTP2, IPv6 etc).
I have files in a Google Cloud Storage bucket.
How to set these files as the origin for a Cloudflare CDN?
(The Cloudflare control panel seems to just want a website on a root domain...?)
Maybe a bit late, but I put my answer just in case it is useful for someone else looking to do the same thing.
I have a bucket in Google Cloud Storage behind CloudFlare. You just need to follow the instructions here:
https://cloud.google.com/storage/docs/website-configuration
In CloudFlare you will need to manage your root domain, but then you can create a subdomain just for your bucket in Google Cloud Storage (don't forget to enable CloudFlare features on that subdomain). I think that's the way CloudFlare works, managing your root domain and I don't think you can avoid it.
If you need specific settings for the subdomain used for your bucket, you can use page rules in CloudFlare. For example, I had to use them because Google Cloud Storage does not support SSL but my pages using those static files were on SSL, so I had specific settings for that subdomain to use flexible SSL.

How to get my files using a secure connection (https)

I want to host my pictures in a secure server(https).
My app is using https in all webpages so I don't want to run into problems of
browsers saying that my webpage isn't safe.
And I was wondering if I can do this in Google Cloud Storage.
Google Cloud Storage works just fine over HTTPS. Just retrieve pages from 'https://storage.googleapis.com' instead of from 'http://storage.googleapis.com'.
Note that there's one exception: you cannot use HTTPS for custom domain name buckets. So if you create the bucket 'example.com', you can access it at 'https://storage.googleapis.com/example.com' or at 'http://example.com' but not at 'https://example.com'
I found out that you only need to type manually the https as protocol that it is going to work just fine.