I deployed my Vue.js SPA with Google Cloud's Storage Bucket.
Google's balancer does not let me configure the redirection from HTTPS to HTTP. The .htaccess
file is not acknowledged either (at least, as per other StackOverflow questions I stumbled upon).
How do I enforce the redirection from HTTP to HTTPS in the context of GCP's storage bucket?
I was thinking about modifying the Router itself in my application, but
/
, /resume
, /manifesto
)...If you are using static website serving there is no way to use HTTPS, let alone redirecting HTTP.
If you are directly serving from storage.googleapis.com/bucket or bucket.storage.googleapis.com both HTTP and HTTPS will work but there is no way to stop plain HTTP from working.
You can use Google Cloud HTTPS Loadbalancing with a backend bucket. This will allow you to serve with HTTPS on a your own domain. You can then either have no plain HTTP at all or have HTTP traffic go to a different backend (e.g. a GCE instance that returns an HTTP 302 redirect or a different bucket with an index page that contains an HTML meta-redirect).
You could also use a third party CDN like Cloudflare in front of GCS to provide SSL features.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With