Skip to content

Commit

Permalink
addCsrfHeader
Browse files Browse the repository at this point in the history
  • Loading branch information
TomeCirun committed Sep 5, 2022
1 parent 8bd7fbf commit 55f38ba
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ckan/public/base/javascript/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
if (type == 'POST') {
options.type = 'POST';
options.data = JSON.stringify(data);
csrfInput()
addCsrfHeader()
} else {
options.type = 'GET';
options.url += data;
Expand Down
2 changes: 1 addition & 1 deletion ckan/public/base/javascript/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ this.ckan = this.ckan || {};

/* Adds the X-CSRFToken header
*/
csrfInput = function() {
addCsrfHeader = function() {
var csrftoken = $('meta[name=_csrf_token]').attr('content')
$.ajaxSetup({
beforeSend: function(xhr, settings) {
Expand Down

0 comments on commit 55f38ba

Please sign in to comment.