mirror of https://github.com/apache/nifi.git
NIFI-10196 Corrected Jolt UI CSRF Header Handling
Signed-off-by: Matthew Burgess <mattyb149@apache.org> This closes #6198
This commit is contained in:
parent
4c0555a476
commit
0dea0ae364
|
@ -19,11 +19,9 @@
|
|||
|
||||
var AppRun = function($rootScope,$state,$http){
|
||||
|
||||
// Get the Request Token for CSRF mitigation and send on all requests
|
||||
if (nf.AuthorizationStorage.hasToken()) {
|
||||
var token = nf.AuthorizationStorage.getRequestToken();
|
||||
$http.defaults.headers.common['Request-Token'] = token;
|
||||
}
|
||||
// Set CSRF Cookie and Header names to match Spring Security configuration in StandardCookieCsrfTokenRepository
|
||||
$http.defaults.xsrfCookieName = '__Secure-Request-Token';
|
||||
$http.defaults.xsrfHeaderName = 'Request-Token';
|
||||
|
||||
$rootScope.$on('$stateChangeError', function(event, toState, toParams, fromState, fromParams, error){
|
||||
event.preventDefault();
|
||||
|
|
Loading…
Reference in New Issue