Don't disable required params check

This commit is contained in:
Deluan
2020-01-09 10:35:00 -05:00
committed by Deluan Quintão
parent 24cbf766a3
commit a706429a4a
2 changed files with 12 additions and 6 deletions
+2 -1
View File
@@ -18,9 +18,10 @@ type SubsonicHandler = func(http.ResponseWriter, *http.Request) (*responses.Subs
func Router() http.Handler {
r := chi.NewRouter()
r.Use(checkRequiredParameters)
// Add validation middleware if not disabled
if !conf.Sonic.DisableValidation {
r.Use(checkRequiredParameters)
r.Use(authenticate)
// TODO Validate version
}