Google App Engine通配符子域 [英] Google App Engine Wildcard Subdomains

查看:120
本文介绍了Google App Engine通配符子域的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有运行在Google App引擎上的Node JS应用。

I have Node JS app running on google app engine.

我已将自定义域链接到它:www.singlelisting.co

I have linked a custom domain to it: www.singlelisting.co

BUT

我还需要通配符子域才能链接到节点应用程序

I need wildcard subdomains to also link to the node application

例如:6.singlelisting.co或ns324.singlelisting.co

For Example: 6.singlelisting.co or ns324.singlelisting.co

我没有太多运气来阅读Google开发人员网站
上的文档我正在使用cloudflare用于DNS管理,并为所有google A和AAAA记录添加了*记录。我认为问题是Google看到了子域。任何帮助将不胜感激

I have not had much luck reading the documentation on google developers site I am using cloudflare for DNS management and have added * records for all the google A and AAAA records. I believe the problem is have google is seeing the subdomains. Any help would be greatly appreciated

推荐答案

您有两种选择:


  1. 映射子域:在您的 App Engine自定义域配置中,您需要添加以下内容条目 *。singlelisting.co ,然后使用所需的记录更新DSN管理(您可能已经做了)。这意味着通过 6.singlelisting.co ns324.singlelisting.co 进行的请求将由<$ c处理您的App Engine部署的$ c> 6 个 ns324 服务(如果有)。如文档所述:

  1. Mapping subdomains: in your App Engine Custom domains config you need to add the following entry *.singlelisting.co and then update the DSN management with the required records (as you probably did). This means that requests through 6.singlelisting.co or ns324.singlelisting.co will be handled by the 6, respectively ns324 service of you App Engine deployment, if available. As the documentation states:

如果您为自定义域设置了通配符子域映射,则您的应用程序将为与以下任何子域匹配的请求提供服务:
。如果用户浏览与服务名称匹配的域,则应用程序将提供该服务。

If you set up a wildcard subdomain mapping for your custom domain, then your application serves requests for any subdomain that matches: .If the user browses a domain that matches a service name, the application serves that service.


  • 使用调度文件(更多信息此处):此文件将覆盖路由规则

  • By using a dispatch file (more info here): this file will override the routing rules established (or not) through your domains config.
  • 所以基本上,如果您没有名为 6 和<$ c的服务$ c> ns324 会自动处理通过通配符规则 *。singlelisting.co 传入的请求,您必须使用<$描述路由c $ c> dispatch.yaml 。

    So basically if you do not have services named 6 and ns324 that will automatically handle requests incoming through the wildcard rule *.singlelisting.co, you have to describe the routing using the dispatch.yaml.

    这篇关于Google App Engine通配符子域的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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