Link Details

Link 395955 thumbnail
User 225256 avatar

By mswatcher
Published: Apr 14 2010 / 09:14

A while back ago I wrote an article about how to use Rails built-in forgery protection in your RESTful AJAX calls. Normally AJAX requests, those responding true to request.xhr? in rails, are forgery whitelisted. But sometimes, and under what conditions I am not sure, AJAX methods are subjected to forgery protection. Maybe you have the ActionDispatch::Request#forgery_whitelisted? overridden to not include AJAX requests? Either way and for whatever reason
  • 10
  • 0
  • 2501
  • 1

Add your comment

Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.

Java EE7
Written by: Andrew Lee Rubinger
Featured Refcardz: Top Refcardz:
  1. Design Patterns
  2. OO JS
  3. Cont. Delivery
  4. CI Patterns
  5. CI Tools
  1. Spring Integration
  2. Git
  3. Regex
  4. Java
  5. REST