Bring back v2 rule matchers
This commit is contained in:
parent
21da705ec9
commit
683e2ee5c6
54 changed files with 3773 additions and 114 deletions
|
@ -947,10 +947,10 @@ func TestPostgres(t *testing.T) {
|
|||
// This test requires to have a TLS route, but does not actually check the
|
||||
// content of the handler. It would require to code a TLS handshake to
|
||||
// check the SNI and content of the handlerFunc.
|
||||
err = router.muxerTCPTLS.AddRoute("HostSNI(`test.localhost`)", 0, nil)
|
||||
err = router.muxerTCPTLS.AddRoute("HostSNI(`test.localhost`)", "", 0, nil)
|
||||
require.NoError(t, err)
|
||||
|
||||
err = router.AddRoute("HostSNI(`*`)", 0, tcp2.HandlerFunc(func(conn tcp2.WriteCloser) {
|
||||
err = router.muxerTCP.AddRoute("HostSNI(`*`)", "", 0, tcp2.HandlerFunc(func(conn tcp2.WriteCloser) {
|
||||
_, _ = conn.Write([]byte("OK"))
|
||||
_ = conn.Close()
|
||||
}))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue