Skip to content

It's not working as expected when paired with nosurf #6

@sam0737

Description

@sam0737

It is broken when used with https://github.com/justinas/nosurf/ because...

  1. If token failed to validate, and 400 response has been written, the handler chain is not stopped which defeat the purpose.
  2. nosurf replaced the request with key embedded in context value, and such the original request must be replaced. Otherwise there is no way to get the token out in the handler and place it in HTML tag or alike.

Here is my fix attempt: justinas/nosurf#30 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions