Return proper errors when admin API is not initialized (#6988)

Especially in gateway IAM admin APIs are not enabled
if etcd is not enabled, we should enable admin API though
but only enable IAM and Config APIs with etcd configured.
This commit is contained in:
Harshavardhana
2018-12-18 13:03:26 -08:00
committed by GitHub
parent 5a5895203b
commit e7c902bbbc
5 changed files with 48 additions and 36 deletions

View File

@@ -107,8 +107,8 @@ func configureServerHandler(endpoints EndpointList) (http.Handler, error) {
// Add Admin RPC router
registerAdminRPCRouter(router)
// Add Admin router.
registerAdminRouter(router)
// Add Admin router, all APIs are enabled in server mode.
registerAdminRouter(router, true)
// Add healthcheck router
registerHealthCheckRouter(router)