Use a custom authorization header, to avoid conflicts with proxies using basic auth (fixes #146)
This commit is contained in:
+2
-1
@@ -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{})
|
||||
|
||||
Reference in New Issue
Block a user