You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a reason that you are using r.RequestURI instead of r.URL.Path. The problem with r.RequestURI ist that it does not work with http.StripPrefix, so the following code always returns a 404 because it does not notice that the "admin" prefix has been stripped off the path (http.StripPrefix does only modify r.URL.Path):
It should be pretty simple to make a config option to use r.URL.Path instead; I already have some code to do that if RequestURI is empty, which can happen with certain test code, so it should be easy to adapt that. I'll be glad to accept a PR if you want to take this on; otherwise I should probably have time next week to take care of it.
Is there a reason that you are using
r.RequestURI
instead ofr.URL.Path
. The problem withr.RequestURI
ist that it does not work withhttp.StripPrefix
, so the following code always returns a 404 because it does not notice that the "admin" prefix has been stripped off the path (http.StripPrefix
does only modifyr.URL.Path
):The text was updated successfully, but these errors were encountered: