From bc251f5a29283c22d40bbaed5327bc8c1c9f1266 Mon Sep 17 00:00:00 2001 From: Ares Li Date: Wed, 19 Apr 2023 15:43:18 -0700 Subject: [PATCH] GUACAMOLE-1775: Use header for auth token instead of a parameter in "session/tunnels//protocol" request --- .../frontend/src/app/rest/services/tunnelService.js | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/guacamole/src/main/frontend/src/app/rest/services/tunnelService.js b/guacamole/src/main/frontend/src/app/rest/services/tunnelService.js index 6a637ff71..1f0cde50d 100644 --- a/guacamole/src/main/frontend/src/app/rest/services/tunnelService.js +++ b/guacamole/src/main/frontend/src/app/rest/services/tunnelService.js @@ -88,17 +88,10 @@ angular.module('rest').factory('tunnelService', ['$injector', */ service.getProtocol = function getProtocol(tunnel) { - // Build HTTP parameters set - var httpParameters = { - token : authenticationService.getCurrentToken() - }; - - // Retrieve the protocol details of the specified tunnel - return requestService({ + return authenticationService.request({ method : 'GET', url : 'api/session/tunnels/' + encodeURIComponent(tunnel) - + '/protocol', - params : httpParameters + + '/protocol' }); };