【发布时间】:2015-01-30 03:41:49
【问题描述】:
我正在使用 Google Cloud Endpoints 在 Python 中为 Android 应用程序编写后端。当我尝试在开发服务器 (localhost) 上运行 Google 的 API Explorer 来测试我的 API 时,它给了我一个关于 SSL 的错误:
403 Forbidden
{
"error": {
"errors": [
{
"domain": "global",
"reason": "sslRequired",
"message": "SSL is required to perform this operation."
}
],
"code": 403,
"message": "SSL is required to perform this operation."
}
}
Google 的文档支持这一点:
端点需要 SSL。 (https://cloud.google.com/appengine/docs/python/endpoints/)
“开发 Web 服务器不支持 HTTPS 连接” cloud.google.com/appengine/docs/python/config/appconfig#Python_app_yaml_Secure_URLs
我有两个不方便的解决方法:使用 CURL 将命令发送到开发服务器(如以下站点所示)或仅测试已部署的版本。 API Explorer 非常方便,过去几年我每次使用它都可以使用它,最近一次是在 2014 年 8 月。
有谁知道 API Explorer 需要 SSL 是不是最近的变化?有没有办法在开发服务器上使用 API Explorer,正如这里所说的(https://cloud.google.com/appengine/docs/python/endpoints/test_deploy#running_and_testing_api_backends_locally)?
谢谢。
【问题讨论】:
标签: python google-app-engine ssl google-cloud-endpoints