Test for loop detected header

This commit is contained in:
Melon 2023-08-30 12:13:55 +01:00
parent f1a2ce0896
commit 221a46cc55
Signed by: melon
GPG Key ID: 6C9D970C50D26A25

View File

@ -42,7 +42,7 @@ func TestRoute_ServeHTTP(t *testing.T) {
{Route{Dst: "2.2.2.2/world", Flags: FlagAbs | FlagSecureMode}, "https://2.2.2.2/world"},
{Route{Dst: "api.example.com/world", Flags: FlagAbs | FlagSecureMode | FlagForwardHost}, "https://api.example.com/world"},
{Route{Dst: "api.example.org/world", Flags: FlagAbs | FlagSecureMode | FlagForwardAddr}, "https://api.example.org/world"},
{Route{Dst: "3.3.3.3/headers", Flags: FlagAbs, Headers: http.Header{"X-Other": []string{"test value"}}}, "http://3.3.3.3/headers"},
{Route{Dst: "3.3.3.3/headers", Flags: FlagAbs, Headers: http.Header{"X-Other": []string{"test value"}, "X-Violet-Loop-Detect": []string{"1"}}}, "http://3.3.3.3/headers"},
}
for _, i := range a {
pt := &proxyTester{}