mirror of
https://git.freecumextremist.com/grumbulon/pomme.git
synced 2024-11-25 05:53:47 +00:00
fix(api): 401 on bad auth
Signed-off-by: Sam Therapy <sam@samtherapy.net>
This commit is contained in:
parent
33a2ce5bea
commit
3e839fdf5f
1 changed files with 1 additions and 0 deletions
|
@ -52,6 +52,7 @@ func authFailed(w http.ResponseWriter, r *http.Request, realm string) {
|
|||
w.Header().Set("Content-Type", "text/plain; charset=utf-8")
|
||||
w.Header().Set("X-Content-Type-Options", "nosniff")
|
||||
w.Header().Add("WWW-Authenticate", fmt.Sprintf(`Realm="%s"`, realm))
|
||||
w.WriteHeader(http.StatusUnauthorized)
|
||||
|
||||
resp := internal.Response{
|
||||
Message: fmt.Sprintf(`Login failed -- Realm="%s"`, realm),
|
||||
|
|
Loading…
Reference in a new issue