Skip to content

Not throwing method not allowed, when I have not allowed a PUT method and have a POST method #998

Description

@SoulPancake

I have a POST method using a custom middleware

	`r.With(middleware.AuthMiddleware).Method(http.MethodPost, "/something", handlers.Handler(someHandler))`

and for this /something there is no other route or other method mentioned anywhere
So My expectation is the chi should throw a 405 method not allowed and it seems to work for other cases, however for this POST ( originally ), hitting PUT method, it doesn't throw a 405 and just redirects to some random route.

Is there something I am missing? Or some configuration I am supposed to additionally do or remove to fix this?

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