将子域映射到App Engine上的特定服务 [英] Map subdomain to specific service on app engine
问题描述
我想将notification.api.example.co.uk
映射到名为notification-api
我已经在应用引擎上成功添加了一个名为api.example.com
的自定义域,因此希望以下dispatch.yaml
就足够了:
I've added a custom domain on app engine called api.example.com
successfully, so was hoping the following dispatch.yaml
would be sufficient:
dispatch:
- url: "notification.api.example.co.uk/*"
service: notification-api
因此,我希望任何请求,例如到notification.api.example.co.uk/test-api
的POST都可以将请求路由到服务并提供响应,但它根本不会到达后端.
I was hoping, therefore, any request, for example, a POST to notification.api.example.co.uk/test-api
would route the request to service and render a response, but it doesn't reach the backend at all.
此路由中是否存在错误,文档令人困惑?
Is there something wrong in this routing, the docs are quite confusing?
推荐答案
You need to map a wild card subdomain to your app engine. We need to know that everything for api.example.co.uk goes to your app in order to route notifications.api.example.co.uk to you.
这篇关于将子域映射到App Engine上的特定服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!