honojs / hono

Web framework built on Web Standards
https://hono.dev
MIT License
19.07k stars 544 forks source link

inconsistent route response #2612

Closed sonigeez closed 5 months ago

sonigeez commented 5 months ago

What version of Hono are you using?

4.3.1

What runtime/platform is your app running on?

node

What steps can reproduce the bug?

  1. Basic template
  2. add this code snippet
    app.get('/api/v1/users', (c) => {
    return c.json({ message: 'Hello World' });
    });

What is the expected behavior?

return {"message":"Hello World"} in both "/api/v1/users" and "/api/v1/users/" routes

What do you see instead?

404 on "/api/v1/users/" route

Additional information

No response

sor4chi commented 5 months ago

Try this option and see!

new Hono({
  strict: false,
})
sonigeez commented 5 months ago

thanks