mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-12 05:50:06 +00:00
Fixed JWT path when running the rpcdaemon (#3840)
This commit is contained in:
parent
bc368098c8
commit
396bd03021
@ -569,6 +569,10 @@ func isWebsocket(r *http.Request) bool {
|
||||
func obtainJWTSecret(cfg httpcfg.HttpCfg) ([]byte, error) {
|
||||
// try reading from file
|
||||
log.Info("Reading JWT secret", "path", cfg.JWTSecretPath)
|
||||
// If we run the rpcdaemon and datadir is not specified we just use jwt.hex in current directory.
|
||||
if len(cfg.JWTSecretPath) == 0 {
|
||||
cfg.JWTSecretPath = "jwt.hex"
|
||||
}
|
||||
if data, err := os.ReadFile(cfg.JWTSecretPath); err == nil {
|
||||
jwtSecret := common.FromHex(strings.TrimSpace(string(data)))
|
||||
if len(jwtSecret) == 32 {
|
||||
|
Loading…
Reference in New Issue
Block a user