Skip to content

Commit 8343bf2

Browse files
authored
disable insight rpc (#305)
1 parent a8cac5c commit 8343bf2

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

internal/rpc/rpc.go

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,16 @@ func Initialize() (IRPCClient, error) {
7171
return nil, fmt.Errorf("RPC_URL environment variable is not set")
7272
}
7373
log.Debug().Msg("Initializing RPC")
74-
rpcClient, dialErr := gethRpc.Dial(rpcUrl)
74+
75+
ctx := context.Background()
76+
77+
// Initialize RPC client with custom header to disable insight RPC tracking
78+
rpcClient, dialErr := gethRpc.DialOptions(
79+
ctx,
80+
rpcUrl,
81+
gethRpc.WithHeader("x-disable-insight-rpc", "true"),
82+
)
83+
7584
if dialErr != nil {
7685
return nil, dialErr
7786
}

0 commit comments

Comments
 (0)