HTTP to HTTPS redirection on App Engine Flexible

前端 未结 3 841
傲寒
傲寒 2020-11-29 09:40

I\'ve followed the answer of this: Redirect from http to https in google cloud but it does not seem to be currently accurate any more. The anchor referenced ( https://cloud.

3条回答
  •  佛祖请我去吃肉
    2020-11-29 10:15

    The flexible environment does not current support handlers in the app.yaml. If you want https:// redirection, you have a few options:

    • Use helmet to do to HSTS stuff for you, and implement your own initial redirect.
    • I wrote a happy little library to always forces SSL on all routes for express yes-https

    We are considering auto-redirecting all traffic to SSL by default. Do you think that would be a good thing for your apps?

提交回复
热议问题