From 724ccd982646addf70f774ae8204156aae496a8e Mon Sep 17 00:00:00 2001 From: Bryan Boreham Date: Tue, 9 Oct 2018 15:50:59 +0000 Subject: [PATCH] Use the Context in the request --- app/router.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/router.go b/app/router.go index 28ad84c5a..c3347092c 100644 --- a/app/router.go +++ b/app/router.go @@ -43,7 +43,7 @@ type CtxHandlerFunc func(context.Context, http.ResponseWriter, *http.Request) func requestContextDecorator(f CtxHandlerFunc) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { - ctx := context.WithValue(context.Background(), RequestCtxKey, r) + ctx := context.WithValue(r.Context(), RequestCtxKey, r) f(ctx, w, r) } }