search for: ifform_authenticity_token

Displaying 1 result from an estimated 1 matches for "ifform_authenticity_token".

2014 May 03
0
Putting form_authenticity_token (csrf token) in a cookie instead of in meta tags?
...t but thought I would ask here, to see if people think there would be problems with it: I could create an after_action in ApplicationController that looks like this: after_action :set_authenticity_cookie def set_authenticity_cookie cookies[:form_authenticity_token] = form_authenticity_token ifform_authenticity_token end So basically send the form_authenticity_token to the browser in a cookie instead of putting it in the HTML. Client-side, I could write a little JavaScript that pulls it out of the cookie and dynamically creates the meta tags that jquery-rails is expecting. * Questions: * 1. Does this...