Only send the CSRF token on mutable HTTP methods (where it is needed)

This commit is contained in:
Joseph Schorr 2014-01-27 13:58:12 -05:00
parent 96e15d285d
commit a87e5ba9ae

View file

@ -2514,7 +2514,7 @@ quayApp.run(['$location', '$rootScope', 'Restangular', 'UserService', 'PlanServi
function($location, $rootScope, Restangular, UserService, PlanService, $http, $timeout) {
// Handle session security.
Restangular.setDefaultRequestParams({'_csrf_token': window.__token || ''});
Restangular.setDefaultRequestParams(['post', 'put', 'remove', 'delete'], {'_csrf_token': window.__token || ''});
// Handle session expiration.
Restangular.setErrorInterceptor(function(response) {