- edited description
Routing via annotation does not work for root endpoint
Issue #38
new
What did I do?
- Routing is possible with method names or by annotations
- Used routing via annotation for root endpoint (»Api\Route("/")«) and other endpoints (»@Api\Route("/acme-endpoint/")«)
What did I expect?
- Controller routes all endpoints to expected controllers
What happend instead?
- Root endpoint controllers is routed for all requests
Possible Reason
The regex to calculate the path to a matching method will always hit the »/« route, as it matches every route
Possible solution
Compare the requested URI and handle requests for the root (»/«) differently.
Workaround
I removed the annotation routing and renamed the index controller to match the routing by method format.
Comments (2)
-
reporter -
reporter - edited description
- Log in to comment
BTW Thank you for this package and the provided good-natured documentation