Skip to content

Commit

Permalink
Test sandbox headers
Browse files Browse the repository at this point in the history
  • Loading branch information
JackPlowman committed Apr 26, 2024
1 parent e78d2a1 commit 4be48f8
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 2 deletions.
11 changes: 11 additions & 0 deletions proxies/sandbox/apiproxy/policies/AssignMessage.AddProxyURL.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<AssignMessage async="false" continueOnError="false" enabled="true" name="AddProxyURL">
<DisplayName>Add Proxy URL</DisplayName>
<Add>
<Headers>
<Header name="Proxy-Url">{proxy.url}</Header>
</Headers>
</Add>
<IgnoreUnresolvedVariables>true</IgnoreUnresolvedVariables>
<AssignTo createNew="false" transport="http" type="request"/>
</AssignMessage>
3 changes: 3 additions & 0 deletions proxies/sandbox/apiproxy/targets/sandbox.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
<Step>
<Name>FlowCallout.ApplyRateLimiting</Name>
</Step>
<Step>
<Name>AddProxyURL</Name>
</Step>
<Response>
<Step>
<Name>AssignMessage.AddCors</Name>
Expand Down
2 changes: 1 addition & 1 deletion sandbox/api/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def get_related_persons() -> Union[dict, tuple]:
Returns:
Union[dict, tuple]: Response for GET /RelatedPerson
"""

print(request.args)
try:
# Check Headers
if errors := check_for_errors(request):
Expand Down
2 changes: 1 addition & 1 deletion specification/validated-relationships-service-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ info:
url: 'https://digital.nhs.uk/developer/help-and-support'
email: [email protected]
servers:
- url: 'https://internal-dev-sandbox.api.service.nhs.uk/validated-relationships-service-api/FHIR/R4'
- url: 'https://sandbox.api.service.nhs.uk/validated-relationships-service-api/FHIR/R4'
description: Sandbox environment.
- url: 'https://int.api.service.nhs.uk/validated-relationships/FHIR/R4'
description: Integration test environment.
Expand Down

0 comments on commit 4be48f8

Please sign in to comment.