mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-08 04:54:05 -05:00
Allow custom headers in validator client HTTP requests (#15884)
* Allow custom headers in validator client HTTP requests * changelog <3 * improve flag description * Bastin's review * James' review * add godoc for NodeConnectionOption
This commit is contained in:
@@ -45,6 +45,13 @@ var (
|
||||
Usage: "Beacon node REST API provider endpoint.",
|
||||
Value: "http://127.0.0.1:3500",
|
||||
}
|
||||
// BeaconRESTApiHeaders defines a list of headers to send with all HTTP requests to the beacon node.
|
||||
BeaconRESTApiHeaders = &cli.StringFlag{
|
||||
Name: "beacon-rest-api-headers",
|
||||
Usage: `Comma-separated list of key value pairs to pass as headers for all HTTP calls to the beacon node.
|
||||
To provide multiple values for the same key, specify the same key for each value.
|
||||
Example: --grpc-headers=key1=value1,key1=value2,key2=value3`,
|
||||
}
|
||||
// CertFlag defines a flag for the node's TLS certificate.
|
||||
CertFlag = &cli.StringFlag{
|
||||
Name: "tls-cert",
|
||||
|
||||
@@ -51,6 +51,7 @@ func startNode(ctx *cli.Context) error {
|
||||
var appFlags = []cli.Flag{
|
||||
flags.BeaconRPCProviderFlag,
|
||||
flags.BeaconRESTApiProviderFlag,
|
||||
flags.BeaconRESTApiHeaders,
|
||||
flags.CertFlag,
|
||||
flags.GraffitiFlag,
|
||||
flags.DisablePenaltyRewardLogFlag,
|
||||
|
||||
@@ -93,6 +93,7 @@ var appHelpFlagGroups = []flagGroup{
|
||||
Flags: []cli.Flag{
|
||||
flags.CertFlag,
|
||||
flags.BeaconRPCProviderFlag,
|
||||
flags.BeaconRESTApiHeaders,
|
||||
flags.EnableRPCFlag,
|
||||
flags.RPCHost,
|
||||
flags.RPCPort,
|
||||
|
||||
Reference in New Issue
Block a user