According to substrate rpc docs we shouldn't be exposing some RPCs as they are deemed dangerous. How does one go about turning them off?
While these RPCs are available, they are not callable if you "disable" them. If you run with
--rpc-methods Safe all the rpc methods that are seen as "unsafe" will return an error when being called. For validators it is advised to disable external RPCs anyway, which is the default if you are not running with