honojs / hono

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

Wrong api response after path definition #2620

Closed MarioCares closed 2 months ago

MarioCares commented 2 months ago

What version of Hono are you using?

4.2.9

What runtime/platform is your app running on?

Cloudflare Workers

What steps can reproduce the bug?

app.get('/', async (c) => { return c.text("route / GET"); });

app.get('/:path', async (c) => { return c.text("route / with path GET"); });

app.post('/', async (c) => { return c.text("route / POST"); });

What is the expected behavior?

When POST to / it should respond: route / POST

What do you see instead?

route / GET

Additional information

No response

MarioCares commented 2 months ago

It was a cloudflare problem. Everything (POST, PUT, DELETE) was redirected to GET request.