Skip to content

Commit

Permalink
Remove automatic forwarding of Authorization header
Browse files Browse the repository at this point in the history
  • Loading branch information
Acconut committed Sep 18, 2024
1 parent bf7f845 commit 37aa10d
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions pkg/hooks/grpc/grpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,8 @@ func (g *GrpcHook) Setup() error {
}

func (g *GrpcHook) InvokeHook(hookReq hooks.HookRequest) (hookRes hooks.HookResponse, err error) {
req := marshal(hookReq)

authorizationHeader, authorizationHeaderExists := req.Event.HttpRequest.Header["Authorization"]
ctx := context.Background()
if authorizationHeaderExists {
ctx = metadata.AppendToOutgoingContext(context.Background(), "Authorization", authorizationHeader)
}

req := marshal(hookReq)
res, err := g.Client.InvokeHook(ctx, req)
if err != nil {
return hookRes, err
Expand Down

0 comments on commit 37aa10d

Please sign in to comment.