将子域映射到App Engine上的特定服务 [英] Map subdomain to specific service on app engine

查看:48
本文介绍了将子域映射到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屋!

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