GCP点自定义域到特定的App引擎服务 [英] GCP Point Custom Domain to Specific App Engine Service

查看:195
本文介绍了GCP点自定义域到特定的App引擎服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前拥有一个包含四项服务的Google App Engine Flexible项目。当我使用文档 https将我的自定义域映射到我的项目时://cloud.google.com/appengine/docs/standard/python/mapping-custom-domains ,它会自动指向不是前端应用程序的默认服务。如何将其映射到不同的服务。

I currently have an Google App Engine Flexible project with four services. And when I map my custom domain to my project using the documentation https://cloud.google.com/appengine/docs/standard/python/mapping-custom-domains, it automatically points to the default service which is not the frontend application. How do I map it to a different service.

推荐答案

您无法将某个(子)域映射到应用级自定义域映射,映射只在应用级完成(作为一个整体)。

You cannot map a certain (sub)domain to a certain service in the app-level custom domain mapping, mapping is done only at the app level (as a whole).

要将某个(子)域指向您的某个服务应用程序,您需要使用发送文件,例如:

To direct a certain (sub)domain to a certain service inside your app you'll need to use a dispatch file, for example:

dispatch:
  - url: "example.com/*"
    module: <frontend-service-name>

注意:您可能想重温在非默认服务中处理前端的决定:前端是恕我直言,最适合处理任何进入的垃圾请求(这通常不符合任何路由规则,因此将指向默认服务)。如果您的默认服务比前端更敏感,那么它可能不像垃圾邮件进来。

Side note: you may want to revisit the decision of handling the frontend in a non-default service: the frontend is IMHO best suited to handle any garbage request coming in (which would typically not match any routing rule and would thus be directed towards the default service). If your default service does something more sensitive than the frontend it might not like that spam coming in.

这篇关于GCP点自定义域到特定的App引擎服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆