fix(blossom): respond with 401 on missing Auth

This commit is contained in:
Anthony Accioly 2025-01-26 17:12:16 +00:00 committed by fiatjaf_
parent 5e5a53240a
commit c4d9ef1025
2 changed files with 3 additions and 2 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
*.env
.idea/
knowledge.md

View File

@ -22,7 +22,7 @@ func (bs BlossomServer) handleUploadCheck(w http.ResponseWriter, r *http.Request
return
}
if auth == nil {
blossomError(w, "missing \"Authorization\" header", 400)
blossomError(w, "missing \"Authorization\" header", 401)
return
}
if auth.Tags.GetFirst([]string{"t", "upload"}) == nil {
@ -56,7 +56,7 @@ func (bs BlossomServer) handleUpload(w http.ResponseWriter, r *http.Request) {
return
}
if auth == nil {
blossomError(w, "missing \"Authorization\" header", 400)
blossomError(w, "missing \"Authorization\" header", 401)
return
}
if auth.Tags.GetFirst([]string{"t", "upload"}) == nil {