Closed thonythony closed 7 months ago
3.11.2
Cloudflare Workers
Hello,
Define a route with multiple paths like this :
app.on( 'GET', [ '/blog/*', ...LANGUAGES.map((lang) => `/${lang}/blog/*`), '/_elderjs/*', ...LANGUAGES.map((lang) => `/${lang}/_elderjs/*`), ], ...proxifyBlogMiddleware(), )
The handle should be called when matching following routes :
/blog
/blog/1234
/en/blog/1234
A 404 is returned.
If I define routes like this :
const blogRoutes = [ '/blog/*', ...LANGUAGES.map((lang) => `/${lang}/blog/*`), '/_elderjs/*', ...LANGUAGES.map((lang) => `/${lang}/_elderjs/*`), ] for (const route of blogRoutes) { app.get(route, ...proxifyBlogMiddleware()) }
Everything works as expected.
Hi @thonythony
With only the description, we can't determine where is not working. So please provide a minimal example or minimal project for reproducing.
No response, so I'll close this.
What version of Hono are you using?
3.11.2
What runtime/platform is your app running on?
Cloudflare Workers
What steps can reproduce the bug?
Hello,
Define a route with multiple paths like this :
What is the expected behavior?
The handle should be called when matching following routes :
/blog
/blog/1234
/en/blog/1234
What do you see instead?
A 404 is returned.
Additional information
If I define routes like this :
Everything works as expected.