Created
February 8, 2012 13:08
-
-
Save vijedi/1769263 to your computer and use it in GitHub Desktop.
CSRF Token: The Wrong way.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$("body").bind("ajaxSend", function(elm, xhr, s){ | |
if (s.type == "POST") { | |
xhr.setRequestHeader('X-CSRF-Token', Common.CSRF_TOKEN); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment