Skip to content

Commit 540017f

Browse files
AoiAsusapessi
authored andcommitted
Fix ProxyWithContext to use original context (awslabs#42)
1 parent 7cc3115 commit 540017f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/request.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ func addToHeader(req *http.Request, apiGwRequest events.APIGatewayProxyRequest)
215215
func addToContext(ctx context.Context, req *http.Request, apiGwRequest events.APIGatewayProxyRequest) *http.Request {
216216
lc, _ := lambdacontext.FromContext(ctx)
217217
rc := requestContext{lambdaContext: lc, gatewayProxyContext: apiGwRequest.RequestContext, stageVars: apiGwRequest.StageVariables}
218-
ctx = context.WithValue(req.Context(), ctxKey{}, rc)
218+
ctx = context.WithValue(ctx, ctxKey{}, rc)
219219
return req.WithContext(ctx)
220220
}
221221

0 commit comments

Comments
 (0)