NIFI-9339: Fixed headers to include appropriate Reqest-Token header for all requests to the server for JoltTransformJSON UI

Signed-off-by: Nathan Gough <thenatog@gmail.com>

This closes #5487.
This commit is contained in:
Mark Payne 2021-10-26 16:57:51 -04:00 committed by Nathan Gough
parent 30efcd35e4
commit 0eee70c4b9
1 changed files with 3 additions and 2 deletions

View File

@ -19,9 +19,10 @@
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.getToken();
$http.defaults.headers.common.Authorization = 'Bearer ' + token;
var token = nf.AuthorizationStorage.getRequestToken();
$http.defaults.headers.common['Request-Token'] = token;
}
$rootScope.$on('$stateChangeError', function(event, toState, toParams, fromState, fromParams, error){