Skip to content

Commit

Permalink
Fix upstream creds in test
Browse files Browse the repository at this point in the history
  • Loading branch information
Mygod committed Nov 2, 2023
1 parent 397bfdf commit cd93f0e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion common_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,13 +212,16 @@ func TestMain(m *testing.M) {
},
}

upstreamBuf := make([]byte, base64.StdEncoding.EncodedLen(9))
base64.StdEncoding.Encode(upstreamBuf, []byte("upstreamtest:upstreampass"))

caddyHTTPForwardProxyAuth = caddyTestServer{
addr: "127.0.69.73:6973",
root: "./test/forwardproxy",
proxyHandler: &Handler{
PACPath: defaultPACPath,
ACL: []ACLRule{{Subjects: []string{"all"}, Allow: true}},
AuthCredentials: [][]byte{buf},
AuthCredentials: [][]byte{upstreamBuf},
AuthRequired: true,
},
}
Expand Down

0 comments on commit cd93f0e

Please sign in to comment.