From 2be795f2ae869caed4317cf894f3515f7a101f91 Mon Sep 17 00:00:00 2001 From: eesa456 Date: Thu, 27 Jun 2024 01:10:01 +0100 Subject: [PATCH] remove auth lookup and ods pointer headers --- .../ConnectionMetadata.SetRequestHeaders.js | 32 ------------------- 1 file changed, 32 deletions(-) diff --git a/proxies/live/apiproxy/resources/jsc/ConnectionMetadata.SetRequestHeaders.js b/proxies/live/apiproxy/resources/jsc/ConnectionMetadata.SetRequestHeaders.js index 454c40e..a955188 100644 --- a/proxies/live/apiproxy/resources/jsc/ConnectionMetadata.SetRequestHeaders.js +++ b/proxies/live/apiproxy/resources/jsc/ConnectionMetadata.SetRequestHeaders.js @@ -49,39 +49,8 @@ nrlPermissions = permissions; } - var enableAuthorizationLookup = context.getVariable("app.enable-authorization-lookup"); var nrlAppID = context.getVariable("app.nrl-app-id"); - if(enableAuthorizationLookup == "true") { - enableAuthorizationLookup = true - } else if (enableAuthorizationLookup === null || enableAuthorizationLookup == "false") { - enableAuthorizationLookup = false - } else { - //This will trigger RaiseFault.403NoPointers.xml - see targets/target.xml - return; - } - - var pointerTypes = []; - // Read the associated `nrl-ods-` custom attribute from the APIGEE app - var nrlPointerTypes = context.getVariable("app.nrl-ods-" + odsCode); - - if (!hasAllPointerPermissions && (!enableAuthorizationLookup && !nrlPointerTypes)) { - //This will trigger RaiseFault.403NoPointers.xml - see targets/target.xml - return; - } - - if (nrlPointerTypes){ - // Convert it into a complex object - var lines = nrlPointerTypes.split(/\s+/); - - for (var i = 0; i < lines.length; i++) { - var line = lines[i]; - if (line && line.trim().length !== 0) { - pointerTypes.push(line); - } - } - } - var odsCodeExtension = context.getVariable( "request.header.NHSD-End-User-Organisation" ); @@ -90,7 +59,6 @@ var connectionMetadata = { "nrl.ods-code": odsCode, "nrl.ods-code-extension": odsCodeExtension, - "nrl.pointer-types": pointerTypes, "nrl.enable-authorization-lookup": enableAuthorizationLookup, "nrl.app-id": nrlAppID };