Redirect http to https in a static site object storage with ssl
Hello I configured an static web site, and I enabled ssl, it is working ok, according to this guides.
https://www.linode.com/docs/guides/host-static-site-object-storage/
https://www.linode.com/docs/guides/enable-ssl-for-object-storage/
But, Is there a way to redirect http to https by default? I have a big SPA html/javascript, if the client open the http site, the browser loads all the app to wait to be redirect to https by javascript, and the app is loaded again in https. That way is too slow and heavy.
In AWS S3 hosting static web sites you have the https redirect option.
Any ideas?
Thank you
6 Replies
hey there at @diegomesata!
Are you still experiencing this problem?
While Linode does not offer a user interface option for https redirect, our Object Storage team mentioned that the first few hits might load slowly, but that the subsequent ones should load at normal speeds. That being said, you may be able to achieve a similar result with s3cmd by using the steps outlined in the link below.
It may also be possible to force the redirect earlier using JavaScript. The below Stack Overflow post may provide some additional guidance on that.
Hi @rdaniels,
I'm interested in a forced HTTPS solution as well. I've already went through the links you shared in your response but the former is not actually a solution and the latter is just a workaround.
Regarding to the first guide, the author actually blocked all insecure (HTTP) access to the bucket objects with a bucket policy (JSON format). As far as I can tell, there's no way to configure such a policy in an Object Storage bucket here in Linode. The only reason he uses s3cmd in his guide is to prove HTTP access is actually denied.
Are there any plans in the roadmap to natively support HTTP to HTTPS redirection?
Best,
Joshua