Use a custom authorization header, to avoid conflicts with proxies using basic auth (fixes #146)

This commit is contained in:
Deluan
2020-04-06 16:03:20 -04:00
parent c3edc7f449
commit 3f9ddb915e
5 changed files with 44 additions and 4 deletions
+2 -1
View File
@@ -38,8 +38,9 @@ func (app *Router) routes(path string) http.Handler {
r.Post("/createAdmin", CreateAdmin(app.ds))
r.Route("/api", func(r chi.Router) {
r.Use(mapAuthHeader())
r.Use(jwtauth.Verifier(auth.TokenAuth))
r.Use(Authenticator(app.ds))
r.Use(authenticator(app.ds))
app.R(r, "/user", model.User{})
app.R(r, "/song", model.MediaFile{})
app.R(r, "/album", model.Album{})