mirror of https://github.com/waku-org/nwaku.git
fix: admin REST API to be enabled only if config is set (#2218)
This commit is contained in:
parent
aeb77a3e75
commit
110de90ff6
|
@ -674,9 +674,9 @@ proc startRestServer(app: App, address: ValidIpAddress, port: Port, conf: WakuNo
|
|||
return defaultResponse()
|
||||
|
||||
let server = ? newRestHttpServer(address, port, requestErrorHandler = requestErrorHandler)
|
||||
|
||||
## Admin REST API
|
||||
installAdminApiHandlers(server.router, app.node)
|
||||
if conf.restAdmin:
|
||||
installAdminApiHandlers(server.router, app.node)
|
||||
|
||||
## Debug REST API
|
||||
installDebugApiHandlers(server.router, app.node)
|
||||
|
|
Loading…
Reference in New Issue