From 0e128d608357087591ae60e997a2848e8910ddef Mon Sep 17 00:00:00 2001 From: Jonny Stoten Date: Tue, 11 Jun 2024 11:20:42 +0100 Subject: [PATCH] Pass context from http request to attest lib --- pkg/handler/handler.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/handler/handler.go b/pkg/handler/handler.go index 8ae84bc..32e719d 100644 --- a/pkg/handler/handler.go +++ b/pkg/handler/handler.go @@ -1,7 +1,6 @@ package handler import ( - "context" "encoding/json" "fmt" "io" @@ -74,7 +73,7 @@ func handler(w http.ResponseWriter, req *http.Request) { } // verify attestations - ctx := context.TODO() + ctx := req.Context() debug := true ctx = policy.WithPolicyEvaluator(ctx, policy.NewRegoEvaluator(debug)) policy, err := attest.Verify(ctx, opts, resolver)