当我在 app.yaml 中添加 secure: always 参数时,我仍然没有被重定向到 https。当我手动输入 Https 时,它可以工作,并且我正在实时服务器上对其进行测试,但它会将网站视为安全的:总是不存在。
我最终只是尝试将它映射到 yaml 文件中的所有处理程序,但它仍然没有效果。
application: appname
version: 1
runtime: python27
api_version: 1
threadsafe: yes
handlers:
- url: /favicon\.ico
static_files: favicon.ico
upload: favicon\.ico
secure: always
- url: /css
static_dir: css
secure: always
- url: /fonts
static_dir: fonts
secure: always
- url: /js
static_dir: js
secure: always
- url: /img
static_dir: img
secure: always
- url: .*
script: main.app
secure: always
libraries:
- name: webapp2
version: "2.5.2"
- name: jinja2
version: "2.6"
error_handlers:
- file: default_error.html