2
votes

I have deployed a site on google cloud on Nodejs environment. I want to redirect the user from http to https as i want to make https as default. I have already attached SSL certificate with my custom domain in App engine and it is working fine. I also tried to redirect to https from node but none is working on google cloud.

I am having less knowledge of cloud if things did not work then i have to migrate to Heroku.

1
This solution worked for me stackoverflow.com/a/42991054/1128918Gustavo Straube

1 Answers

4
votes

You have to setup it in your app.yaml

handlers:
- url: /.*
  script: IGNORED
  secure: always

See https://cloud.google.com/appengine/docs/flexible/nodejs/configuring-your-app-with-app-yaml#security