mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-22 08:34:20 +01:00
plugins/clnrest: disable ourselves unless rest-port is set.
This mirrors grpc's behavior, and avoids listening on ports without explicit user permission. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -110,7 +110,10 @@ def start_server():
|
||||
|
||||
@plugin.init()
|
||||
def init(options, configuration, plugin):
|
||||
set_config(options)
|
||||
# We require options before we open a port.
|
||||
err = set_config(options)
|
||||
if err:
|
||||
return {'disable': err}
|
||||
start_server()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user