如果用户错误地将www用于 appspot.com 域,如何避免"潜在的安全问题"?



我在Google App Engine - Standard Environment - api_version: go1.

如果一个天真的用户在URL中错误地输入了www,https://www.givebackourbusses.appspot.com 他们在Firefox中会收到一个可怕的警告:

"未连接:潜在的安全问题">

我不会为此站点使用自定义域,并且希望通过修改 app.yaml 文件来保持静态。

这是我当前的app.yaml文件:

runtime: go
api_version: go1
handlers:
- url: /favicon.ico
static_files: static/favicon.ico
upload: static/favicon.ico
- url: /
static_files: static/index.html
upload: static/index.html
secure: always
- url: /static
static_dir: static
secure: always
# Everything not caught by the above goes to the app's Go code.
- url: /.*
script: _go_app
secure: always

如何修改 app.yaml 文件以将 www.givebackourbusses.appspot.com 请求定向到 https://givebackourbusses.appspot.com?

App Engine 默认证书涵盖 *.appspot.com,但不包括 ..appspot.com。

因此,使用 https://project.appspot.com/访问它按预期工作,但 https://www.project.appspot.com 不会返回警告。

唯一的解决方法是使用自定义证书。

最新更新