From a2b3bb6461872e7aa2786c2581448f7bba15a5f4 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 5cc547b40..2ebb08bd7 100644 --- a/guacamole/src/main/frontend/src/app/rest/services/tunnelService.js +++ b/guacamole/src/main/frontend/src/app/rest/services/tunnelService.js @@ -97,17 +97,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' }); };