Skip to content

Issue with trailing slash redirect #89

Description

@faizan-glitch

BunRouter is redirecting a POST request without a trailing to the GET Handler

I have the following code
image

If i send a POST request to /accounts/ then it works perfectly fine
But if send a POST request to /accounts then it redirects to GET /accounts
I have attached some screenshots below
As it can be seen that it works fine if i have a trailing slash
image

but if I remove the trailing slash I get this
image

Notice how I get method not allowed that is because I am getting redirected to a GET handler for /accounts/ which doesn't exists
image

POST Request to /accounts should get redirected to POST handler of /accounts/ instead of GET handler of /accounts

P.S: I am using bunrouter v1.0.20

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions