1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-08-02 20:35:25 +02:00

refactor(global): remove useless code related to CSRF (#387)

This commit is contained in:
Anthony Lapenna 2016-12-16 14:00:57 +13:00 committed by GitHub
parent 5b16deb73e
commit d9f6124609
3 changed files with 1 additions and 61 deletions

View file

@ -464,8 +464,6 @@ angular.module('portainer', [
});
// The Docker API likes to return plaintext errors, this catches them and disp
// $httpProvider.defaults.xsrfCookieName = 'csrfToken';
// $httpProvider.defaults.xsrfHeaderName = 'X-CSRF-Token';
$httpProvider.interceptors.push(function() {
return {
'response': function(response) {
@ -477,11 +475,6 @@ angular.module('portainer', [
time: 10000
});
}
// CSRF protection is disabled for the moment
// var csrfToken = response.headers('X-Csrf-Token');
// if (csrfToken) {
// document.cookie = 'csrfToken=' + csrfToken;
// }
return response;
}
};