diff --git a/backend/cmd/root.go b/backend/cmd/root.go index bb7b4c56..7121c93e 100644 --- a/backend/cmd/root.go +++ b/backend/cmd/root.go @@ -111,7 +111,11 @@ user created with the credentials from options "username" and "password".`, checkErr(err) var listener net.Listener - address := serverConfig.Address + ":" + strconv.Itoa(serverConfig.Port) + listenAddress := serverConfig.Address + if listenAddress == "" { + listenAddress = "[::]" // default an + } + address := listenAddress + ":" + strconv.Itoa(serverConfig.Port) switch { case serverConfig.Socket != "": diff --git a/backend/filebrowser.yml b/backend/filebrowser.yml index 07503bbb..2edb6a8d 100644 --- a/backend/filebrowser.yml +++ b/backend/filebrowser.yml @@ -1,6 +1,6 @@ server: - port: 8050 - baseURL: "" + port: 8080 + baseURL: "/" address: '' log: stdout database: database.db @@ -12,7 +12,7 @@ general: disable-type-detection-by-header: false auth: header: '' - method: password + method: noauth command: '' signup: false shell: '' diff --git a/backend/settings/config.go b/backend/settings/config.go index 130ac7d0..d9648274 100644 --- a/backend/settings/config.go +++ b/backend/settings/config.go @@ -22,16 +22,13 @@ func init() { if err != nil { log.Fatalf("Error reading YAML data: %v", err) } - log.Println(GlobalConfiguration) setDefaults() - log.Println(GlobalConfiguration) - // Unmarshal the YAML data into the Settings struct err = yaml.Unmarshal(yamlData, &GlobalConfiguration) if err != nil { log.Fatalf("Error unmarshaling YAML data: %v", err) } - log.Println(GlobalConfiguration) + log.Printf("GlobalConfiguration: \n%#v\n", GlobalConfiguration) // Now you have the Settings struct with values from the YAML file // You can access the values like: defaultSettings.Key, defaultSettings.Server.Port, etc. diff --git a/backend/storage/bolt/auth.go b/backend/storage/bolt/auth.go index 79fa9133..4e05f611 100644 --- a/backend/storage/bolt/auth.go +++ b/backend/storage/bolt/auth.go @@ -14,7 +14,6 @@ type authBackend struct { func (s authBackend) Get(t string) (auth.Auther, error) { var auther auth.Auther - fmt.Println("auth.go", t) switch t { case "password": auther = &auth.JSONAuth{} @@ -27,6 +26,7 @@ func (s authBackend) Get(t string) (auth.Auther, error) { default: return nil, errors.ErrInvalidAuthMethod } + fmt.Println("auth.go", t) return auther, get(s.db, "auther", auther) }