Skip to content

🎧 Your Personal Streaming Service

Renamed DisableValidation to DisableAuthentication

Deluanff5b91da54cf
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"