From ff5b91da54cff4df013d17bccbc25b4ffd3fe6cb Mon Sep 17 00:00:00 2001 From: Deluan Date: Thu, 9 Jan 2020 11:48:09 -0500 Subject: [PATCH] Renamed DisableValidation to DisableAuthentication --- api/api.go | 2 +- conf/app.conf | 15 --------------- conf/configuration.go | 7 +++---- tests/sonic-test.toml | 2 +- 4 files changed, 5 insertions(+), 21 deletions(-) delete mode 100644 conf/app.conf diff --git a/api/api.go b/api/api.go index b645e6039..c7122f77e 100644 --- a/api/api.go +++ b/api/api.go @@ -21,7 +21,7 @@ func Router() http.Handler { r.Use(checkRequiredParameters) // Add validation middleware if not disabled - if !conf.Sonic.DisableValidation { + if !conf.Sonic.DisableAuthentication { r.Use(authenticate) // TODO Validate version } diff --git a/conf/app.conf b/conf/app.conf deleted file mode 100644 index 33ae67b5a..000000000 --- a/conf/app.conf +++ /dev/null @@ -1,15 +0,0 @@ -appname = github.com/cloudsonic/sonic-server -serverName = CloudSonic -runMode = dev -autoRender = false -copyRequestBody = true -enableAdmin = false - -apiVersion = 1.8.0 - -[dev] -enableAdmin = true - -[test] -enableAdmin = false -httpPort = 8081 diff --git a/conf/configuration.go b/conf/configuration.go index 3bee484be..fd84eb8aa 100644 --- a/conf/configuration.go +++ b/conf/configuration.go @@ -15,15 +15,14 @@ type sonic struct { IgnoredArticles string `default:"The El La Los Las Le Les Os As O A"` IndexGroups string `default:"A B C D E F G H I J K L M N O P Q R S T U V W X-Z(XYZ) [Unknown]([)"` - User string `default:"anyone"` - Password string `default:"wordpass"` + DisableAuthentication bool `default:"false"` + User string `default:"anyone"` + Password string `default:"wordpass"` DisableDownsampling bool `default:"false"` - DisableValidation bool `default:"false"` DownsampleCommand string `default:"ffmpeg -i %s -map 0:0 -b:a %bk -v 0 -f mp3 -"` PlsIgnoreFolders bool `default:"true"` PlsIgnoredPatterns string `default:"^iCloud;\\~"` - RunMode string `default:"dev"` } var Sonic *sonic diff --git a/tests/sonic-test.toml b/tests/sonic-test.toml index 9e3f4ea59..7ab635c46 100644 --- a/tests/sonic-test.toml +++ b/tests/sonic-test.toml @@ -1,4 +1,4 @@ -DisableValidation = false +DisableAuthentication = false User = "deluan" Password = "wordpass" DbPath = "/tmp/testDb"