krakenjs / lusca

Application security for express apps.
Other
1.78k stars 123 forks source link

add cookie setting and angular shorthand option to csrf #56

Closed jasisk closed 9 years ago

jasisk commented 9 years ago

This change introduces two new features to csrf:

  1. cookie option which, when configured, sets a cookie with the csrf token
  2. angular option which, when true, sets the options based on the defaults defined in angular's $http
aredridel commented 9 years ago

Wow. This is like a better-tested version of what I was thinking about this morning.

aredridel commented 9 years ago

:+1:

jasisk commented 9 years ago

https://github.com/jasisk/angular-lusca-example Assumes this PR is published at 1.2.0 but, otherwise, proves this in the context of an angular app.

grawk commented 9 years ago

Looks good! :+1: