Redirects should occur on your backend configuration. Your Google Cloud
Load Balancer will provide you with a 'X-Forwarded-Proto
<https://cloud.google.com/compute/docs/load-balancing/http/#components>'
header equal to a value of 'http' or 'https'. You would then configure you
backend's '*.htacces*' file to redirect to HTTPS if the header is equal to
'http' like so:
RewriteEngine On
RewriteCond %{HTTP:X-Forwarded-Proto} =http
RewriteRule . https://%{HTTP:Host}%{REQUEST_URI} [L,R=permanent]
- Note that if you are just hosting your site on Google Cloud Storage than
you will not have a '.htaccess' file, since Cloud Storage is only able to
server static website and not dynamic (aka it cannot execute any code). It
is instead recommended to deploy an actual backend webserver to serve your
website, such as a LAMP server on Compute Engine
<https://cloud.google.com/community/tutorials/setting-up-lamp>.
--
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit
https://groups.google.com/d/msgid/google-appengine/c92b6d6e-8b06-4914-8d73-cdee1da55ac9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.