wild card for multiple routes does not work
What version of Hono are you using?
4.6.3
What runtime/platform is your app running on?
Deno
What steps can reproduce the bug?
Multiple wild card fails.
app.get(
'/*.html',
async (c, next) => {
console.log('in html');
await next();
}
// this next route overrides the wildcard
app.get(
'/css/*.css',
async (c, next) => {
console.log('in css');
await next();
}
What is the expected behavior?
when requesting for '/index.html' -> both console should work
What do you see instead?
none of the console is working. looks like the second wild card must have overridden and messed up everything. No response
Additional information
No response
Hi @skandasoft
It's not a bug. Use a regexp: https://hono.dev/docs/api/routing#regexp
I tried a few regex to match .html and css/.css, it doesn't seem to work. Is there a particular format in which need to sent the regex to the route?
This issue has been marked as stale due to inactivity.
Closing this issue due to inactivity.