Skip to content

Commit

Permalink
Merge pull request ckan#8036 from TomeCirun/8021-datatables-does-not-…
Browse files Browse the repository at this point in the history
…implement-CSRF

[8021]FIX datatables does not implement CSRF support
  • Loading branch information
pdelboca authored Apr 19, 2024
2 parents ab7ce51 + a888d94 commit 2dfd6b5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ckanext/datatablesview/assets/datatablesview.js
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,9 @@ this.ckan.module('datatables_view', function (jQuery) {
url: ajaxurl,
type: 'POST',
timeout: 60000,
headers: {
'X-CSRF-Token': $('meta[name="_csrf_token"]').attr('content')
},
data: function (d) {
d.filters = ckanfilters
}
Expand Down

0 comments on commit 2dfd6b5

Please sign in to comment.