0

嗨,我想让我的所有处理程序在谷歌应用引擎项目中加载为 https。任何人都可以知道一种方法吗?是否有我们可以为所有处理程序应用的配置?

4

2 回答 2

1

在您的 app.yaml 中,secure: always用于您希望使用 https 的每个处理程序。例如:

handlers:

- url: /youraccount/.*
  script: accounts.py
  login: required
  secure: always

您可以在文档中阅读有关安全 URL的更多信息。

于 2012-08-14T05:51:45.187 回答
1

你使用 webapp2 吗?使用 webapp2,您可以指定路由允许的 URI 方案:

webapp2.Route(r'/products', handler='handlers.ProductsHandler', name='products-list', schemes=['https'])

请参阅:http ://webapp-improved.appspot.com/guide/routing.html

于 2012-08-14T10:17:07.400 回答