text: !function(){angular.module("spring-security-csrf-token-interceptor",[]).config(["$httpProvider",function($httpProvider){var getTokenData=function(){var defaultCsrfTokenHeader="X-CSRF-TOKEN",csrfTokenHeaderName="X-CSRF-HEADER",xhr=new XMLHttpRequest;xhr.open("head","/",!1),xhr.send();var csrfTokenHeader=xhr.getResponseHeader(csrfTokenHeaderName);return csrfTokenHeader=csrfTokenHeader?csrfTokenHeader:defaultCsrfTokenHeader,{headerName:csrfTokenHeader,token:xhr.getResponseHeader(csrfTokenHeader)}},csrfTokenData=getTokenData(),numRetries=0,MAX_RETRIES=5;$httpProvider.interceptors.push(function($q,$injector){return{request:function(config){return config.headers[csrfTokenData.headerName]=csrfTokenData.token,config||$q.when(config)},responseError:function(response){if(403==response.status&&MAX_RETRIES>numRetries){csrfTokenData=getTokenData();var $http=$injector.get("$http");return++numRetries,$http(response.config)}return response},response:function(response){return numRetries=0,response}}})}])}();