Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

rc: Allow user to disable authentication for web gui

negative0e0cbe413e1dc
diff --git a/fs/rc/rcserver/rcserver.go b/fs/rc/rcserver/rcserver.go
index 5e5ae84f5..e2f8bd22e 100644
--- a/fs/rc/rcserver/rcserver.go
+++ b/fs/rc/rcserver/rcserver.go
@@ -95,20 +95,20 @@ 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")
- }
- if opt.HTTPOptions.BasicUser == "" {
- opt.HTTPOptions.BasicUser = "gui"
- fs.Infof(nil, "No username specified. Using default username: %s \n", rcflags.Opt.HTTPOptions.BasicUser)
- }
- if opt.HTTPOptions.BasicPass == "" {
- randomPass, err := random.Password(128)
- if err != nil {
- log.Fatalf("Failed to make password: %v", err)
+ 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)
+ }
+ if opt.HTTPOptions.BasicPass == "" {
+ randomPass, err := random.Password(128)
+ if err != nil {
+ log.Fatalf("Failed to make password: %v", err)
+ }
+ opt.HTTPOptions.BasicPass = randomPass
+ fs.Infof(nil, "No password specified. Using random password: %s \n", randomPass)
}
- opt.HTTPOptions.BasicPass = randomPass
- fs.Infof(nil, "No password specified. Using random password: %s \n", randomPass)
}
opt.Serve = true