App Engine go111 Beta routing/handler wildcard ignores order?

44 views Asked by At

I just tried the GO 1.11 App Engine Beta and the router/handler seems to be different. I use RESTful-VueJS approach and I used the following handler config:

- url: /v1/.*
  script: auto
  redirect_http_response_code: 301
  secure: always

- url: /worker/.*
  script: auto
  redirect_http_response_code: 301
  login: admin

- url: /.*
  mime_type: text/html
  static_files: static/public/index.html
  upload: static/public/index.html
  redirect_http_response_code: 301
  secure: always

In the first app engine generation the order of the handlers matters, the 1st one with a matching pattern wins. But this doesn't seem to work like this anymore. So even when I call a "/v1/xyz" I always receive the "index.html"

I guess that has to do with the fact that now in app engine all traffic is served using the entrypoint command. As far as I understand it tries to match HandleFuncs() that are set in main() or init()? And what if you use any web framework like me were you don't specify the routes in main() or init() because you want to use mux?

0

There are 0 answers