Tornado 6.5 Documentation
need to instrument your JavaScript to include the _xsrf value with each request. This is the jQuery [http://jquery.com/] function we use at FriendFeed for AJAX POST requests that automatically adds the _xsrf var r = document.cookie.match("\\b" + name + "=([^;]*)\\b"); return r ? r[1] : undefined; } jQuery.postJSON = function(url, args, callback) { args._xsrf = getCookie("_xsrf"); $.ajax({url: Minor updates have been made to several existing demos, including updates to more recent versions of jquery. Credits The following people contributed commits to this release: A. Jesse Jiryu Davis Aaron0 码力 | 437 页 | 405.14 KB | 2 月前3Tornado 6.5 Documentation
also need to instrument your JavaScript to include the _xsrf value with each request. This is the jQuery function we use at FriendFeed for AJAX POST requests that automatically adds the _xsrf value to all getCookie(name) { var r = document.cookie.match("\\b" + name + "=([^;]*)\\b"); return r ? r[1] : undefined; } jQuery.postJSON = function(url, args, callback) { args._xsrf = getCookie("_xsrf"); $.ajax({url: url, data: Minor updates have been made to several existing demos, including updates to more recent versions of jquery. Credits The following people contributed commits to this release: • A. Jesse Jiryu Davis • Aaron0 码力 | 272 页 | 1.12 MB | 2 月前3
共 2 条
- 1
相关搜索词