Slim-Middleware icon indicating copy to clipboard operation
Slim-Middleware copied to clipboard

Added improved implementation of CSRF guard with ajax protection

Open siberex opened this issue 10 years ago • 2 comments

Added CSRF guard with request header check, compatible with AngularJS cookie & header names by default.

Added configuration options including action on token check fail to address issues like this: http://help.slimframework.com/discussions/questions/912-catch-csrf-error

Added helpers for Twig to ease template updates and jQuery configuration

siberex avatar Aug 19 '14 21:08 siberex

Personally I think you are better off creating separate repository and composer package. That way there will be only one middleware in the commit history. People can also choose which middleware they install instead of installing bunch of unrelated middlewares at once.

tuupola avatar Aug 20 '14 08:08 tuupola

This PR intended as a full replacement of CsrfGuard from Slim-Extras for this repo. If I understand correctly, this repo is a replacement for middleware part of deprecated Slim-Extras. Correct me if I am wrong. My intention was to rewrite old CsrfGuard from scratch and fix all of its issues.

siberex avatar Aug 20 '14 10:08 siberex