4
votes

I want to map notification.api.example.co.uk to a specific app engine service called notification-api

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

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?

1
Is the request reaching any of your services (default most likely)? Did you actually map notification.api.example.co.uk to your app/service? - Dan Cornilescu
Note that multi-level domains can be tricky, see possibly related: stackoverflow.com/a/51576595/4495081 - Dan Cornilescu
@DanCornilescu the dispatch.yaml above produces the mapping of the domain to the service. - John Mike
It routes the request to your service, yes, but only if the request reaches your app. But without mapping the domain to your app how would GAE know the request is for your app? - Dan Cornilescu
I see, so I've added the custom domain already via AE as shown here: imgur.com/HBb9GKJ - John Mike

1 Answers

0
votes

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.