Skip to content

Commit

Permalink
Merge pull request #3 from yashikagarg13/master
Browse files Browse the repository at this point in the history
Get 'csrftoken' from LocalStorage
  • Loading branch information
scabbiaza committed Sep 28, 2015
2 parents 4796435 + 876da58 commit dd5f6a9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,9 @@ $(function () {
}

function handle() {
if (csrftoken) {
if (LocalStorage.get('conf.csrfToken')) {
var setting = { beforeSend: function (xhr) {
xhr.setRequestHeader("X-CSRFToken", csrftoken)
xhr.setRequestHeader("X-CSRFToken", LocalStorage.get('conf.csrfToken'))
}}
}
$.ajax($.extend(setting, {
Expand Down

0 comments on commit dd5f6a9

Please sign in to comment.