controller icon indicating copy to clipboard operation
controller copied to clipboard

feat: Support CSRF token retrieval from header "X-CSRF-Token"

Open masterT opened this issue 1 year ago • 3 comments

Retrieve the request CSRF token from the HTTP header X-CSRF-Token in the case the params _csrf_token is not provided.

Reference:

  • #420

masterT avatar Apr 01 '23 10:04 masterT

Thanks for putting this together, @masterT! However, rather than leave this as a hook inside actions for users to override, I'd prefer we just fully build in support for checking the header for the CSRF token in addition to the request's params.

Would you like to have a go at doing that?

timriley avatar Apr 03 '23 01:04 timriley

Sure, I will craft something.

masterT avatar Apr 03 '23 13:04 masterT

I did implement your suggestion, this is ready for review. 🙂 @timriley

masterT avatar Apr 04 '23 00:04 masterT