Hello,
Currently, when registering middleware on paths with wildcards, you have to use the entire path, not just a prefix.
For example:
kami.Use("/users/", CheckAdminPermission) would affect /users/:id/likes/count because it contains the "/users/" prefix.
However:
kami.Use("/users/:id/", CheckAdminPermission) would not affect /users/:id/likes/count because of the wildcard ":id"
Would it be possible to support registering prefixes with wildcards in the future? Could you also update the documentation to say that the full path has to be used for wildcards?
I've also noticed that you can only register one middleware function per path with a wildcard. Is it feasible to add support for registering multiple middleware functions on a single path?
Thanks, and excellent project!
Hello,
Currently, when registering middleware on paths with wildcards, you have to use the entire path, not just a prefix.
For example:
kami.Use("/users/", CheckAdminPermission)would affect/users/:id/likes/countbecause it contains the "/users/" prefix.However:
kami.Use("/users/:id/", CheckAdminPermission)would not affect/users/:id/likes/countbecause of the wildcard ":id"Would it be possible to support registering prefixes with wildcards in the future? Could you also update the documentation to say that the full path has to be used for wildcards?
I've also noticed that you can only register one middleware function per path with a wildcard. Is it feasible to add support for registering multiple middleware functions on a single path?
Thanks, and excellent project!