jhipster/generator-jhipster — pull request #811 by tgillieron (2014-11-27 10:20:16+00:00)
Title: enable CSRF for cookie based authentication

Inpired by the sample provided by @HimalayFei and @jeffsheets.

Add a Spring Security filter to set a cookie (name = 'CSRF-TOKEN') with the CSRF token generated by Spring.
Configure $http service default CSRF mechanism to read the CSRF token form the cookie and put it in a header known by Spring ('X-CSRF-TOKEN')

linked to #363