From 7465032a41ae0ce2942e668d1e0d46340076b3c0 Mon Sep 17 00:00:00 2001 From: eesa456 Date: Thu, 13 Jun 2024 09:46:00 +0100 Subject: [PATCH] update check to find permission --- .../jsc/ConnectionMetadata.SetRequestHeaders.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/proxies/live/apiproxy/resources/jsc/ConnectionMetadata.SetRequestHeaders.js b/proxies/live/apiproxy/resources/jsc/ConnectionMetadata.SetRequestHeaders.js index c3f5504..dd7ddc7 100644 --- a/proxies/live/apiproxy/resources/jsc/ConnectionMetadata.SetRequestHeaders.js +++ b/proxies/live/apiproxy/resources/jsc/ConnectionMetadata.SetRequestHeaders.js @@ -40,9 +40,6 @@ for (var i = 0; i < permissionLines.length; i++) { var permissionLine = permissionLines[i]; if (permissionLine && permissionLine.trim().length !== 0) { - if (permissionLine.trim() == "allow-all-pointer-types"){ - hasSkipAuthLookup = true; - } permissions.push(permissionLine); } } @@ -76,8 +73,8 @@ // Convert it into a complex object var lines = nrlPointerTypes.split(/\s+/); - for (var x = 0; x < lines.length; x++) { - var line = lines[x]; + for (var i = 0; i < lines.length; i++) { + var line = lines[i]; if (line && line.trim().length !== 0) { pointerTypes.push(line); } @@ -99,4 +96,4 @@ context.targetRequest.headers["NHSD-Connection-Metadata"] = connectionMetadata; -})(); \ No newline at end of file +})();