Semantics of sending.

I look at various pages about dispatch.yaml, most of which contain similar information and examples:

https://cloud.google.com/appengine/docs/flexible/nodejs/how-requests-are-routed#routing_with_a_dispatch_file https://cloud.google.com/appengine/docs/python/config/dispatchref https: // cloud.google.com/appengine/docs/go/config/dispatchref et al.

I use node.js in a flexible GAE environment, but I think it will be the same for every language and environment.

The problem is that these pages do not indicate how dispatch.yaml works. In particular:

  • Are the rules used in this order? I assume that the first matching rule is used, but says nothing about it.
  • Do the leading glob (wildcard) characters match only the domain name, or do they match the first part of the URL? If the rule */hello, is this appropriate myapp.appspot.com/path/hello? I guess not, based on some vague hints in the docs, but this is not very clear.
  • If no rule in dispatch.yaml matches the URL, will it be redirected to the default service? I would have thought it needed, but again, these pages do not say.
  • Do I need to rewrite rule-based URLs before sending them to the service? If the rule */path/*is a URL https://myapp.appspot.com/path/hello, will the service see it as /path/helloor how /hello? I guess the first one.

, . Google .

+4
1

, :

  • , . , , URL- URL-, , : `` ` :

    • url: "*/specific" :

    • url: "/" : `` ` , specific , URL /specific .

  • Unknown

  • . , , - dispatch.yaml default.

  • . */path/* URL- https://myapp.appspot.com/path/hello, /path/hello, /hello.

+2

Source: https://habr.com/ru/post/1659224/


All Articles