Update Angular CSRF handling

This commit is contained in:
Matt-Yorkley
2021-01-10 00:27:17 +00:00
parent f179214920
commit ea9ebc8a33
9 changed files with 10 additions and 9 deletions

View File

@@ -12,7 +12,6 @@ window.Darkswarm = angular.module("Darkswarm", [
'angularFileUpload',
'angularSlideables'
]).config ($httpProvider, $tooltipProvider, $locationProvider, $anchorScrollProvider) ->
$httpProvider.defaults.headers['common']['X-CSRF-Token'] = $('meta[name="csrf-token"]').attr('content')
$httpProvider.defaults.headers['common']['X-Requested-With'] = 'XMLHttpRequest'
$httpProvider.defaults.headers.common.Accept = "application/json, text/javascript, */*"