Skip to content Skip to sidebar Skip to footer

Appengine Module: Routing With Dispatch.yaml Not Working

I'm using modules, but i cannot put to work the routing as explanined here https://developers.google.com/appengine/docs/python/modules/routing to update: appcfg.py update dispatch.

Solution 1:

What's happening is that your dispatch file says to route any request coming to hostname/comunapp/* to your comunapp handler, but the URL getting to that handler is of the type skilled-cargo-111.appspot.com/comunapp/, while you probably only set up the handler for the / path, as you did with the default module.

If you're using Python, try updating your code to something like:

comunapp = webapp2.WSGIApplication([
    ('/comunapp/*', ComunApp),
], debug=True)

It should do the trick.

Also for the "api" path, you should add the "/api/" handler in the default module code.

You could check if dispatch file is working correctly by checking the logs for the comunapp module in the Developers' Console. If you see the requests for /comunapp/* URLs but get a 404 error is what I mentioned earlier. If you wouldn't see anything of those URLs appearing in the comunapp module logs, then the dispatch file is the key to solve the issue.

Post a Comment for "Appengine Module: Routing With Dispatch.yaml Not Working"