Index: admin/rest/src/main/java/org/glassfish/admin/rest/adapter/RestAdapter.java =================================================================== --- admin/rest/src/main/java/org/glassfish/admin/rest/adapter/RestAdapter.java (revision 51581) +++ admin/rest/src/main/java/org/glassfish/admin/rest/adapter/RestAdapter.java (working copy) @@ -221,6 +221,10 @@ } } } + + if (restToken == null) { + restToken = req.getHeader("X-Auth-Token"); + } if (restToken != null) { authenticated = sessionManager.authenticate(restToken, req); Index: admingui/common/src/main/resources/logViewer/logViewerRaw.jsf =================================================================== --- admingui/common/src/main/resources/logViewer/logViewerRaw.jsf (revision 51581) +++ admingui/common/src/main/resources/logViewer/logViewerRaw.jsf (working copy) @@ -118,7 +118,9 @@ }; var poll = function() { - admingui.ajax.get(url, 'log', success); + admingui.ajax.get(url, 'log', success, function(req) { + req.setRequestHeader('X-Auth-Token', '#{sessionScope.__rTkn__}'); + }); } poll(); Index: admingui/common/src/main/resources/js/adminjsf.js =================================================================== --- admingui/common/src/main/resources/js/adminjsf.js (revision 51581) +++ admingui/common/src/main/resources/js/adminjsf.js (working copy) @@ -2110,7 +2110,7 @@ return reqObj; }, - get: function(url, targetId, callback) { + get: function(url, targetId, callback, beforesend) { // Ping header to make sure header stays "fresh" if (targetId && (targetId == 'content')) { admingui.ajax.pingHeader(); @@ -2149,6 +2149,10 @@ } } req.open("GET", url, true); + if (beforesend) { + // Callback that can be used to modify request before it is sent + beforesend(req); + } req.send(""); } },