Bring back v2 rule matchers

This commit is contained in:
Romain 2024-01-23 11:34:05 +01:00 committed by GitHub
parent 21da705ec9
commit 683e2ee5c6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
54 changed files with 3773 additions and 114 deletions

View file

@ -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()
}))