Skip to content

Commit

Permalink
Merge pull request #84 from NHSDigital/feature/nrlf-479-revert-sandbo…
Browse files Browse the repository at this point in the history
…x-set-request-headers

[NRLF-479] Revert the splitting of nrl pointers in sandbox
  • Loading branch information
Brian Bayes authored Apr 25, 2023
2 parents 9c4fdc1 + bc98794 commit 49edd6b
Showing 1 changed file with 1 addition and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,24 +48,14 @@ const nrlPointers = {
return;
}

// Convert it into a complex object
var lines = nrlPointerTypes.split(/\s+/);
var pointerTypes = [];
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"
);

var connectionMetadata = {
"nrl.ods-code": odsCode,
"nrl.ods-code-extension": odsCodeExtension,
"nrl.pointer-types": pointerTypes,
"nrl.pointer-types": nrlPointerTypes,
};
context.targetRequest.headers["NHSD-Connection-Metadata"] =
connectionMetadata;
Expand Down

0 comments on commit 49edd6b

Please sign in to comment.