Google App Engine Wildcard Subdomains

帅比萌擦擦* 提交于 2019-12-13 02:47:19

问题


I have Node JS app running on google app engine.

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

BUT

I need wildcard subdomains to also link to the node application

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

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:


You have two options:

  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.

  2. By using a dispatch file (more info here): this file will override the routing rules established (or not) through your domains config.

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.



来源:https://stackoverflow.com/questions/49344836/google-app-engine-wildcard-subdomains

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!