diff --git a/proxies/live/apiproxy/policies/ServiceCallout.CallHealthcheckEndpoint.xml b/proxies/live/apiproxy/policies/ServiceCallout.CallHealthcheckEndpoint.xml index 1ff9489..719f76c 100644 --- a/proxies/live/apiproxy/policies/ServiceCallout.CallHealthcheckEndpoint.xml +++ b/proxies/live/apiproxy/policies/ServiceCallout.CallHealthcheckEndpoint.xml @@ -6,22 +6,14 @@ false healthcheckResponse - - - - - - - - - - http://mocktarget.apigee.net - - true - User-Agent,Referer,Accept-Language - apikey - + + true + + + + + /aggregator/status 20000 - + \ No newline at end of file diff --git a/proxies/live/apiproxy/targets/target.xml b/proxies/live/apiproxy/targets/target.xml index cf165e4..b391029 100644 --- a/proxies/live/apiproxy/targets/target.xml +++ b/proxies/live/apiproxy/targets/target.xml @@ -1,43 +1,72 @@ - - - + + + + + + + AssignMessage.AddCors + + + (request.verb = "OPTIONS") and (request.header.origin != null) and (request.header.Access-Control-Request-Method != null) + + + + + + + AssignMessage.AddPayloadToPing + + + (proxy.pathsuffix MatchesPath "/_ping") and ((request.verb = "GET") or (request.verb = "HEAD")) + + + + + request.header.apikey = null or private.common.status-endpoint-api-key != request.header.apikey + RaiseFault.401Unauthorized + + + ServiceCallout.CallHealthcheckEndpoint + + + + + javascript.SetStatusResponse + + + (proxy.pathsuffix MatchesPath "/_status") and ((request.verb = "GET") or (request.verb = "HEAD")) + + + + + + - OauthV2.VerifyAccessTokenAppLevel3OrCis2Aal3 + FlowCallout.LogToSplunk - - FlowCallout.ApplyRateLimiting - - - - - - - ExtractVariables.OAuthErrorFaultString - - - AssignMessage.OAuthPolicyErrorResponse - - oauthV2.OauthV2.VerifyAccessToken.failed - - - - - http://mocktarget.apigee.net - - true - User-Agent,Referer,Accept-Language - apikey - - - + + + + {{ SERVICE_BASE_PATH }} + secure + + + (request.verb = "OPTIONS") and (request.header.origin != null) and (request.header.Access-Control-Request-Method != null) + + + (proxy.pathsuffix MatchesPath "/_ping") and ((request.verb = "GET") or (request.verb = "HEAD")) + + + (proxy.pathsuffix MatchesPath "/_status") and ((request.verb = "GET") or (request.verb = "HEAD")) + + + patient-care-aggregator-reporting + + + + AssignMessage.Errors.CatchAllMessage + + + + + diff --git a/specification/patient-care-aggregator-reporting.yaml b/specification/patient-care-aggregator-reporting.yaml index ca544d0..0428c43 100644 --- a/specification/patient-care-aggregator-reporting.yaml +++ b/specification/patient-care-aggregator-reporting.yaml @@ -1,5 +1,6 @@ # This is an OpenAPI Specification (https://swagger.io/specification/) # for patient-care-aggregator-reporting owned by NHS Digital (https://digital.nhs.uk/) + openapi: '3.0.0' info: title: 'patient-care-aggregator-reporting'