是否可以将 "Google Cloud Endpoints" 用于未托管在 "Google Platform" 上的后端 API?

Is it possible to use "Google Cloud Endpoints" for backend APIs that are not hosted on "Google Platform"?

我想知道,是否可以使用 "Google Cloud Endpoints" 的此类功能作为身份验证(与 "Auth0" 或 "Firebase" 集成)、日志和其他具有托管在第三方的后端 API服务器? 我了解到 "Google Cloud Endpoint" 是基于 NGINX 的 "Extensible Service Proxy"。这是否意味着我可以以某种方式编辑 nginx 配置并将其设置为反向代理,以便请求 Google 平台之外的后端 API?

https://cloudplatform.googleblog.com/2016/09/manage-your-APIs-with-Google-Cloud-Endpoints.html的公告说:"Google Cloud Endpoints, a distributed API management suite that lets you deploy, protect, monitor and manage APIs written in any language and running on Google Cloud Platform (GCP)"

但是 https://cloud.google.com/endpoints/docs/about-cloud-endpoints 的文章说:"you can host your API anywhere Docker is supported so long as it has internet access to Google Cloud Platform."

文档中没有任何如何自定义 "Extensible Service Proxy" ngnix 配置文件的示例。

我在这里有点困惑。是否可以按照我上面描述的方式使用 "Google Cloud Endpoint",如果可以,我应该如何正确使用?

可扩展服务代理是一个简单的 nginx 网络服务器,但它使用模板文件。因此,如果您对 nginx.conf 文件进行任何更改,然后重新启动 nginx 服务器 Web 服务器,您的更改将被覆盖。您需要编辑 nginx 模板配置文件,该文件位于 /etc/nginx.

文件夹中

我发现可以在 docker 容器中 运行 可扩展服务代理,该容器接受额外的命令行参数。它允许指定 nginx 将代理请求的应用程序服务器地址,甚至指定将使用的自定义 nginx.conf 文件的路径。那太棒了 ! 有关详细信息,请参阅 google 组中的讨论 https://groups.google.com/forum/#!topic/google-cloud-endpoints/b0QtQoPwHzA

是的,ESP 旨在 运行 任何地方,包括在 GCP 中、在另一个云中或在您自己的服务器上。