auth/middleware: set WWW-Authenticate header field See RFC 6750 section 3.
1 files changed, 1 insertions(+), 0 deletions(-) M auth/middleware.go
M auth/middleware.go => auth/middleware.go +1 -0
@@ 705,6 705,7 @@ func RequireMiddleware(conf ini.File, apiconf string) func(http.Handler) http.Ha auth := r.Header.Get("Authorization") if auth == "" { w.Header().Set("WWW-Authenticate", "Bearer") authError(w, `Authorization header is required. Expected 'Authorization: Bearer [token]'`, http.StatusUnauthorized) return }