【发布时间】:2020-08-21 13:26:02
【问题描述】:
我有一个在 Google Cloud App Engine 中运行的简单无服务器 Next JS 应用程序。我配置了 SSL 证书,我可以通过访问我的 URL 来查看它是否有效。 IE。 https://example.com/ 但是,如果我访问 http://example.com/,它不会自动重定向到我的站点启用 HTTPS 的版本。
app.yaml -
runtime: nodejs
env: flex
# This sample incurs costs to run on the App Engine flexible environment.
# The settings below are to reduce costs during testing and are not appropriate
# for production use. For more information, see:
# https://cloud.google.com/appengine/docs/flexible/nodejs/configuring-your-app-with-app-yaml
service: auto
handlers:
- url: /.*
script: auto
secure: always
manual_scaling:
instances: 1
resources:
cpu: 1
memory_gb: 0.5
disk_size_gb: 10
【问题讨论】:
标签: google-app-engine google-cloud-platform next.js