fix(agent): correct usage of task in StartAgentServer and updated test expectations

This commit is contained in:
yusing
2025-10-22 00:02:13 +08:00
parent 203faa8e7e
commit 9c3346dd9d
5 changed files with 9 additions and 8 deletions

View File

@@ -56,7 +56,7 @@ func TestBypassCIDR(t *testing.T) {
func TestBypassPath(t *testing.T) {
mr, err := ModifyRequest.New(map[string]any{
"bypass": []string{"path /test/*", "path /api"},
"bypass": []string{"path glob(/test/*)", "path /api"},
"set_headers": map[string]string{
"Test-Header": "test-value",
},
@@ -106,7 +106,7 @@ func TestReverseProxyBypass(t *testing.T) {
rp := reverseproxy.NewReverseProxy("test", url, fakeRoundTripper{})
err = PatchReverseProxy(rp, map[string]OptionsRaw{
"response": {
"bypass": "path /test/* | path /api",
"bypass": "path glob(/test/*) | path /api",
"set_headers": map[string]string{
"Test-Header": "test-value",
},