I have two route configured as following
-
GET /api/store/{store_id}/books
GET /api/store/{store_id}
When an API call comes for the first URL without {store_id}
parameter, like /api/store//books
, Gorilla would somehow send a 301 /api/store/books
to client. This is causing me problem because it acutally matched the second route. Gorilla would treat books
as the {store_id}
parameter.
How do I configure Gorilla to return 404 or other error code when receiving //
in URLs?
I am using Gorilla v1.7.0.