cmd/geth, node: allow configuring JSON-RPC on custom path prefix (#22184)
This change allows users to set a custom path prefix on which to mount the http-rpc or ws-rpc handlers via the new flags --http.rpcprefix and --ws.rpcprefix. Fixes #21826 Co-authored-by: Felix Lange <fjl@twurst.com>
This commit is contained in:
@ -139,6 +139,9 @@ type Config struct {
|
||||
// interface.
|
||||
HTTPTimeouts rpc.HTTPTimeouts
|
||||
|
||||
// HTTPPathPrefix specifies a path prefix on which http-rpc is to be served.
|
||||
HTTPPathPrefix string `toml:",omitempty"`
|
||||
|
||||
// WSHost is the host interface on which to start the websocket RPC server. If
|
||||
// this field is empty, no websocket API endpoint will be started.
|
||||
WSHost string
|
||||
@ -148,6 +151,9 @@ type Config struct {
|
||||
// ephemeral nodes).
|
||||
WSPort int `toml:",omitempty"`
|
||||
|
||||
// WSPathPrefix specifies a path prefix on which ws-rpc is to be served.
|
||||
WSPathPrefix string `toml:",omitempty"`
|
||||
|
||||
// WSOrigins is the list of domain to accept websocket requests from. Please be
|
||||
// aware that the server can only act upon the HTTP request the client sends and
|
||||
// cannot verify the validity of the request header.
|
||||
|
Reference in New Issue
Block a user