4

I'm trying to configure my Google App Engine service to redirect all http traffic to https traffic. I've gone through the documentation and this configuration in my app.yaml file seems like it should work but it does not.

app.yaml:

runtime: nodejs
env: flex

handlers:
- url: /.*
  script: server.js
  secure: always

server.js is the file Node needs to run to start the service and is the target for npm run start.

I found the answer in the documentation. The suggested duplicate answer on SO is not entirely correct in that handlers are supported, but the secure setting has been deprecated.

https://cloud.google.com/appengine/docs/flexible/nodejs/upgrading

It suggests using use the X-Forwarded-Proto or HTTP Strict Transport Security response header in your application instead.

Troy
  • 1,799
  • 3
  • 20
  • 29
  • The duplicate answer is in fact correct. The question has incorrect handlers just like yours, but the top two answers are correct. – BrettJ Oct 14 '17 at 14:33

0 Answers0