change default value of dashboard_user and dashboard_pwd to empty string (#2383)

This commit is contained in:
fatedier 2021-05-10 23:04:26 +08:00 committed by GitHub
parent 2408f1df04
commit 0d84da91d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 12 deletions

View File

@ -421,12 +421,12 @@ Configure a port for dashboard to enable this feature:
```ini ```ini
[common] [common]
dashboard_port = 7500 dashboard_port = 7500
# dashboard's username and password are both optionalif not set, default is admin. # dashboard's username and password are both optional
dashboard_user = admin dashboard_user = admin
dashboard_pwd = admin dashboard_pwd = admin
``` ```
Then visit `http://[server_addr]:7500` to see the dashboard, with username and password both being `admin` by default. Then visit `http://[server_addr]:7500` to see the dashboard, with username and password both being `admin`.
![dashboard](/doc/pic/dashboard.png) ![dashboard](/doc/pic/dashboard.png)
@ -444,7 +444,7 @@ admin_user = admin
admin_pwd = admin admin_pwd = admin
``` ```
Then visit `http://127.0.0.1:7400` to see admin UI, with username and password both being `admin` by default. Then visit `http://127.0.0.1:7400` to see admin UI, with username and password both being `admin`.
### Monitor ### Monitor

View File

@ -68,10 +68,10 @@ type ClientCommonConf struct {
// is 0. // is 0.
AdminPort int `ini:"admin_port" json:"admin_port"` AdminPort int `ini:"admin_port" json:"admin_port"`
// AdminUser specifies the username that the admin server will use for // AdminUser specifies the username that the admin server will use for
// login. By default, this value is "admin". // login.
AdminUser string `ini:"admin_user" json:"admin_user"` AdminUser string `ini:"admin_user" json:"admin_user"`
// AdminPwd specifies the password that the admin server will use for // AdminPwd specifies the password that the admin server will use for
// login. By default, this value is "admin". // login.
AdminPwd string `ini:"admin_pwd" json:"admin_pwd"` AdminPwd string `ini:"admin_pwd" json:"admin_pwd"`
// AssetsDir specifies the local directory that the admin server will load // AssetsDir specifies the local directory that the admin server will load
// resources from. If this value is "", assets will be loaded from the // resources from. If this value is "", assets will be loaded from the

View File

@ -72,10 +72,10 @@ type ServerCommonConf struct {
// 0. // 0.
DashboardPort int `ini:"dashboard_port" json:"dashboard_port"` DashboardPort int `ini:"dashboard_port" json:"dashboard_port"`
// DashboardUser specifies the username that the dashboard will use for // DashboardUser specifies the username that the dashboard will use for
// login. By default, this value is "admin". // login.
DashboardUser string `ini:"dashboard_user" json:"dashboard_user"` DashboardUser string `ini:"dashboard_user" json:"dashboard_user"`
// DashboardUser specifies the password that the dashboard will use for // DashboardPwd specifies the password that the dashboard will use for
// login. By default, this value is "admin". // login.
DashboardPwd string `ini:"dashboard_pwd" json:"dashboard_pwd"` DashboardPwd string `ini:"dashboard_pwd" json:"dashboard_pwd"`
// EnablePrometheus will export prometheus metrics on {dashboard_addr}:{dashboard_port} // EnablePrometheus will export prometheus metrics on {dashboard_addr}:{dashboard_port}
// in /metrics api. // in /metrics api.
@ -181,8 +181,8 @@ func GetDefaultServerConf() ServerCommonConf {
VhostHTTPTimeout: 60, VhostHTTPTimeout: 60,
DashboardAddr: "0.0.0.0", DashboardAddr: "0.0.0.0",
DashboardPort: 0, DashboardPort: 0,
DashboardUser: "admin", DashboardUser: "",
DashboardPwd: "admin", DashboardPwd: "",
EnablePrometheus: false, EnablePrometheus: false,
AssetsDir: "", AssetsDir: "",
LogFile: "console", LogFile: "console",

View File

@ -180,8 +180,8 @@ func Test_LoadServerCommonConf(t *testing.T) {
ProxyBindAddr: "0.0.0.9", ProxyBindAddr: "0.0.0.9",
VhostHTTPTimeout: 60, VhostHTTPTimeout: 60,
DashboardAddr: "0.0.0.0", DashboardAddr: "0.0.0.0",
DashboardUser: "admin", DashboardUser: "",
DashboardPwd: "admin", DashboardPwd: "",
EnablePrometheus: false, EnablePrometheus: false,
LogFile: "console", LogFile: "console",
LogWay: "console", LogWay: "console",