forked from Ivasoft/traefik
Fix partial declaration of authentication.
This commit is contained in:
committed by
Traefiker Bot
parent
ef6c1fac4b
commit
479ee9af49
@@ -109,6 +109,8 @@ func GetAuth(labels map[string]string) *types.Auth {
|
||||
auth.Digest = getAuthDigest(labels)
|
||||
} else if HasPrefix(labels, TraefikFrontendAuthForward) {
|
||||
auth.Forward = getAuthForward(labels)
|
||||
} else {
|
||||
return nil
|
||||
}
|
||||
|
||||
return auth
|
||||
|
||||
@@ -732,6 +732,13 @@ func TestGetAuth(t *testing.T) {
|
||||
labels: map[string]string{},
|
||||
expected: nil,
|
||||
},
|
||||
{
|
||||
desc: "should return nil when no real auth",
|
||||
labels: map[string]string{
|
||||
TraefikFrontendAuthHeaderField: "myHeaderField",
|
||||
},
|
||||
expected: nil,
|
||||
},
|
||||
{
|
||||
desc: "should return a basic auth",
|
||||
labels: map[string]string{
|
||||
|
||||
Reference in New Issue
Block a user