mirror of
https://github.com/rclone/rclone.git
synced 2025-06-20 19:57:51 +02:00
rc: Allow user to disable authentication for web gui
This commit is contained in:
parent
2523dd6220
commit
e0cbe413e1
@ -95,9 +95,8 @@ func newServer(ctx context.Context, opt *rc.Options, mux *http.ServeMux) *Server
|
||||
fs.Errorf(nil, "Error while fetching the latest release of Web GUI: %v", err)
|
||||
}
|
||||
if opt.NoAuth {
|
||||
opt.NoAuth = false
|
||||
fs.Infof(nil, "Cannot run Web GUI without authentication, using default auth")
|
||||
}
|
||||
fs.Logf(nil, "It is recommended to use web gui with auth.")
|
||||
} else {
|
||||
if opt.HTTPOptions.BasicUser == "" {
|
||||
opt.HTTPOptions.BasicUser = "gui"
|
||||
fs.Infof(nil, "No username specified. Using default username: %s \n", rcflags.Opt.HTTPOptions.BasicUser)
|
||||
@ -110,6 +109,7 @@ func newServer(ctx context.Context, opt *rc.Options, mux *http.ServeMux) *Server
|
||||
opt.HTTPOptions.BasicPass = randomPass
|
||||
fs.Infof(nil, "No password specified. Using random password: %s \n", randomPass)
|
||||
}
|
||||
}
|
||||
opt.Serve = true
|
||||
|
||||
fs.Logf(nil, "Serving Web GUI")
|
||||
|
Loading…
x
Reference in New Issue
Block a user