1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-24 07:49:41 +02:00

add gorilla/csrf

#199
This commit is contained in:
Kevan Ahlquist 2016-03-31 23:54:12 -05:00
parent 5bf922325a
commit 15d133324d
2 changed files with 34 additions and 1 deletions

View file

@ -25,6 +25,10 @@ angular.module('dockerui', [
'volumes'])
.config(['$routeProvider', '$httpProvider', function ($routeProvider, $httpProvider) {
'use strict';
$httpProvider.defaults.xsrfCookieName = '_gorilla_csrf';
$httpProvider.defaults.xsrfHeaderName = 'X-CSRF-Token';
$routeProvider.when('/', {
templateUrl: 'app/components/dashboard/dashboard.html',
controller: 'DashboardController'
@ -79,7 +83,13 @@ angular.module('dockerui', [
time: 10000
});
}
console.log('response', response);
return response;
},
request: function(config) {
console.log(document.cookie);
console.log('request', config);
return config;
}
};
});