mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-01-22 20:42:13 +00:00
use JWT when and only when the user specifies a JWT secret explicitly (#3786)
This commit is contained in:
parent
4bb42eea7d
commit
4908ba7c13
@ -435,7 +435,9 @@ proc init*(T: type BeaconNode,
|
||||
quit 1
|
||||
|
||||
let optJwtSecret =
|
||||
if cfg.BELLATRIX_FORK_EPOCH != FAR_FUTURE_EPOCH:
|
||||
# Some Web3 endpoints aren't compatible with JWT, but if explicitly chosen,
|
||||
# use it regardless.
|
||||
if config.jwtSecret.isSome:
|
||||
let jwtSecret = rng[].checkJwtSecret(
|
||||
string(config.dataDir), config.jwtSecret)
|
||||
if jwtSecret.isErr:
|
||||
|
Loading…
x
Reference in New Issue
Block a user