Huma not respecting API Gateway path?
bclements opened this issue · 1 comments
This may be a user error on my part so please bear with me.
We are using AWS api gateway that points to our chi service.
apigw.domain.com/blogs -> blogs.domain.com
When we go to any endpoint hosted by our service using the apigw, example apigw.domain.com/blogs/new we get a not found error and the path dev tools says can be found is apigw.domain.com/new ....Looks ilke the chi router is not respecting the original path.
Is there a way to configure chi to respect the path used by the apigw?
Any advice or a hint about where to start looking?
definitely a user problem
I'm not sure clear what the route mapping you're attempting to do.. but keep in mind the routing rules..
r.Handle("/blog/*", someHandler)
or ..
r.Handle("/*", someHandler)
... I'd suggest to just look at how the request is hitting the chi service, print the r.URL.Path and check what is actually hitting chi, then make sure you build a routing rule for it on chi's side, ie.
r.Handle("/new", handler), or r.Handle("/blog/new", handler), etc..
it sounds like you want the aws gateway to forward /blogs/* to a direct subdomain, so make sure your aws gateway is configured properly, that is likely another problem