AppEngine上标准:如何调度基于服务的名称和版本?

问题描述 投票:0回答:1

有没有通过dispatch.yaml文件的方式来分派到基于版本和服务名称的权利服务的请求?

我的意思是,我有这样的要求:https://va4-0-0-dot-api-acceptance-dot-myapp.appspot.com/auth/user

它是由我api-acceptance服务发送的,但我想它去我auth-acceptance服务。

我已经写在我的派遣这些规则,但它不工作...

- url: "va4-0-0.myapp.appspot.com/auth/*"
  service: auth-acceptance
- url: "api-acceptance.myapp.appspot.com/auth/*"
  service: auth-acceptance
google-app-engine google-cloud-platform google-app-engine-python
1个回答
1
投票

按照documentation,您使用的URL模式:

https://[VERSION_ID]-dot-[SERVICE_ID]-dot-[MY_PROJECT_ID].appspot.com

将由dispatch.yaml文件被旁路,所以它不可能重新路由请求这种方式。

使用您想将请求路由到哪个服务和版本,你已经是非常具体的,以上述模式。

因此,无论您更改URL,以https://[VERSION_ID]-dot-auth-acceptance-dot-[MY_PROJECT_ID].appspot.com/auth/user或使用default routing以后可以overriden by a dispatch.yaml

© www.soinside.com 2019 - 2024. All rights reserved.