From 69ddc5524f9de8a9c2662021ba1c8154e3903e9d Mon Sep 17 00:00:00 2001 From: pearl-truss Date: Thu, 1 Feb 2024 12:02:53 -0500 Subject: [PATCH] fix ip address to pull from event and not context --- services/app-api/src/handlers/apollo_gql.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/app-api/src/handlers/apollo_gql.ts b/services/app-api/src/handlers/apollo_gql.ts index b40a763e3f..8fda74db01 100644 --- a/services/app-api/src/handlers/apollo_gql.ts +++ b/services/app-api/src/handlers/apollo_gql.ts @@ -62,7 +62,7 @@ function contextForRequestForFetcher(userFetcher: userFromAuthProvider): ({ const requestSpan = anyContext[requestSpanKey] const authProvider = event.requestContext.identity.cognitoAuthenticationProvider - const ipAddress = context.requestContext.identity.sourceIp + const ipAddress = event.requestContext.identity.sourceIp // This handler is shared with the third_party_API_authorizer // when called from the 3rd party authorizer the cognito auth provider // is not valid for instead the authorizer returns a user ID