File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -430,6 +430,11 @@ func (n *Node) startRPC() error {
430430 }
431431
432432 initAuth := func (port int , secret []byte ) error {
433+ authModules := DefaultAuthModules
434+ if slices .Contains (n .config .HTTPModules , "miner" ) {
435+ authModules = append (authModules , "miner" )
436+ }
437+
433438 // Enable auth via HTTP
434439 server := n .httpAuth
435440 if err := server .setListenAddr (n .config .AuthAddr , port ); err != nil {
@@ -444,7 +449,7 @@ func (n *Node) startRPC() error {
444449 err := server .enableRPC (allAPIs , httpConfig {
445450 CorsAllowedOrigins : DefaultAuthCors ,
446451 Vhosts : n .config .AuthVirtualHosts ,
447- Modules : DefaultAuthModules ,
452+ Modules : authModules ,
448453 prefix : DefaultAuthPrefix ,
449454 rpcEndpointConfig : sharedConfig ,
450455 })
You can’t perform that action at this time.
0 commit comments