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
您有两种选择:
- 映射子域:在您的 App Engine自定义域配置中,您需要添加以下内容条目
*。singlelisting.co
,然后使用所需的记录更新DSN管理(您可能已经做了)。这意味着通过6.singlelisting.co
或ns324.singlelisting.co
进行的请求将由 6 个ns324
服务(如果有)。如文档所述:
- 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 through6.singlelisting.co
orns324.singlelisting.co
will be handled by the6
, respectivelyns324
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.
所以基本上,如果您没有名为 6
和 ns324 会自动处理通过通配符规则 *。singlelisting.co
传入的请求,您必须使用 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
.