feat: improve logs, remove config for disable authentication

This commit is contained in:
Deluan
2020-01-31 08:35:33 -05:00
committed by Deluan Quintão
parent 72d9ddf532
commit d389d40db1
6 changed files with 162 additions and 122 deletions
+3 -6
View File
@@ -6,7 +6,6 @@ import (
"fmt"
"net/http"
"github.com/deluan/navidrome/conf"
"github.com/deluan/navidrome/engine"
"github.com/deluan/navidrome/server/subsonic/responses"
"github.com/go-chi/chi"
@@ -48,11 +47,9 @@ func (api *Router) routes() http.Handler {
r.Use(postFormToQueryParams)
r.Use(checkRequiredParameters)
// Add validation middleware if not disabled
if !conf.Server.DevDisableAuthentication {
r.Use(authenticate(api.Users))
// TODO Validate version
}
// Add validation middleware
r.Use(authenticate(api.Users))
// TODO Validate version
// Subsonic endpoints, grouped by controller
r.Group(func(r chi.Router) {