Skip to content

Commit 9ea9206

Browse files
authored
ContainerRegistry - removed Basic Auth header (#19735)
* Removed Basic Auth header. * Fixed test.
1 parent 6d54799 commit 9ea9206

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

integrations/api_packages_container_test.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,7 @@ func TestPackageContainer(t *testing.T) {
6666
Token string `json:"token"`
6767
}
6868

69-
authenticate := []string{
70-
`Bearer realm="` + setting.AppURL + `v2/token"`,
71-
`Basic`,
72-
}
69+
authenticate := []string{`Bearer realm="` + setting.AppURL + `v2/token"`}
7370

7471
t.Run("Anonymous", func(t *testing.T) {
7572
defer PrintCurrentTest(t)()

routers/api/packages/container/container.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ func apiErrorDefined(ctx *context.Context, err *namedError) {
113113
func ReqContainerAccess(ctx *context.Context) {
114114
if ctx.Doer == nil {
115115
ctx.Resp.Header().Add("WWW-Authenticate", `Bearer realm="`+setting.AppURL+`v2/token"`)
116-
ctx.Resp.Header().Add("WWW-Authenticate", `Basic`)
117116
apiErrorDefined(ctx, errUnauthorized)
118117
}
119118
}

0 commit comments

Comments
 (0)