mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-27 14:13:52 +03:00
ContainerRegistry - removed Basic Auth header (#19735)
* Removed Basic Auth header. * Fixed test.
This commit is contained in:
parent
6d54799bbc
commit
9ea9206406
2 changed files with 1 additions and 5 deletions
|
@ -66,10 +66,7 @@ func TestPackageContainer(t *testing.T) {
|
|||
Token string `json:"token"`
|
||||
}
|
||||
|
||||
authenticate := []string{
|
||||
`Bearer realm="` + setting.AppURL + `v2/token"`,
|
||||
`Basic`,
|
||||
}
|
||||
authenticate := []string{`Bearer realm="` + setting.AppURL + `v2/token"`}
|
||||
|
||||
t.Run("Anonymous", func(t *testing.T) {
|
||||
defer PrintCurrentTest(t)()
|
||||
|
|
|
@ -113,7 +113,6 @@ func apiErrorDefined(ctx *context.Context, err *namedError) {
|
|||
func ReqContainerAccess(ctx *context.Context) {
|
||||
if ctx.Doer == nil {
|
||||
ctx.Resp.Header().Add("WWW-Authenticate", `Bearer realm="`+setting.AppURL+`v2/token"`)
|
||||
ctx.Resp.Header().Add("WWW-Authenticate", `Basic`)
|
||||
apiErrorDefined(ctx, errUnauthorized)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue