-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #252 from NHSDigital/em-1514-pass-product-and-devi…
…ce-id-to-backend EM-1514 Pass product and device id to backend
- Loading branch information
Showing
25 changed files
with
285 additions
and
334 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 0 additions & 4 deletions
4
proxies/live/apiproxy/policies/Javascript.AddAuthorizationHeader.xml
This file was deleted.
Oops, something went wrong.
6 changes: 6 additions & 0 deletions
6
proxies/live/apiproxy/policies/Javascript.SetStatusResponse.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | ||
<Javascript async="false" continueOnError="false" enabled="true" timeLimit="200" name="Javascript.SetStatusResponse"> | ||
<DisplayName>Javascript.SetStatusResponse</DisplayName> | ||
<Properties/> | ||
<ResourceURL>jsc://setStatusResponse.js</ResourceURL> | ||
</Javascript> |
4 changes: 4 additions & 0 deletions
4
proxies/live/apiproxy/policies/Javascript.SetTargetAttributes.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | ||
<Javascript async="false" continueOnError="false" enabled="true" timeLimit="200" name="Javascript.SetTargetAttributes"> | ||
<ResourceURL>jsc://setTargetAttributes.js</ResourceURL> | ||
</Javascript> |
6 changes: 0 additions & 6 deletions
6
proxies/live/apiproxy/policies/javascript.SetStatusResponse.xml
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 0 additions & 13 deletions
13
proxies/live/apiproxy/resources/jsc/ConnectionMetadata.SetAuthorizationHeader.js
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
proxies/live/apiproxy/resources/jsc/setTargetAttributes.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// NO MORE CUSTOM ATTRIBUTES SHOULD BE ADDED IN THIS WAY | ||
// There is a limit on custom attributes per app and if apps have many api connections | ||
// this limit could be easily hit. The exception would be potential global custom attributes | ||
// e.g. product-id, product-device-id | ||
|
||
// If we need to add more then use extended attributes. See: | ||
// https://nhsd-confluence.digital.nhs.uk/display/APM/ExtendedAttributes+shared+flow | ||
|
||
const appPermissions = context.getVariable("app.permissions"); | ||
context.targetRequest.headers["X-MNS-Application-Permissions"] = appPermissions; | ||
|
||
const appMeshMailboxes = context.getVariable("app.mesh-mailboxes"); | ||
context.targetRequest.headers["X-MNS-Application-Mesh-Mailboxes"] = appMeshMailboxes; | ||
|
||
const productId = context.getVariable("app.product-id"); | ||
context.targetRequest.headers["NHSE-Product-ID"] = productId; | ||
|
||
const productDeviceId = context.getVariable("app.product-device-id"); | ||
context.targetRequest.headers["NHSE-Product-Device-ID"] = productDeviceId; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
proxies/sandbox/apiproxy/policies/Javascript.SetStatusResponse.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | ||
<Javascript async="false" continueOnError="false" enabled="true" timeLimit="200" name="Javascript.SetStatusResponse"> | ||
<DisplayName>Javascript.SetStatusResponse</DisplayName> | ||
<Properties/> | ||
<ResourceURL>jsc://setStatusResponse.js</ResourceURL> | ||
</Javascript> |
6 changes: 0 additions & 6 deletions
6
proxies/sandbox/apiproxy/policies/javascript.SetStatusResponse.xml
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.