mirror of https://github.com/apache/nifi.git
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:
parent
30efcd35e4
commit
0eee70c4b9
|
@ -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){
|
||||
|
|
Loading…
Reference in New Issue