Commit 334b7c50 authored by qiuqunfeng's avatar qiuqunfeng
Browse files

commit

parent 79eb9e9e
...@@ -3,6 +3,7 @@ package service ...@@ -3,6 +3,7 @@ package service
import ( import (
"bytes" "bytes"
"context" "context"
"crypto/tls"
"encoding/json" "encoding/json"
"fmt" "fmt"
"io" "io"
...@@ -529,7 +530,14 @@ func (s *wafService) ListListenerFromApiGateway(ctx context.Context, apiGatewayC ...@@ -529,7 +530,14 @@ func (s *wafService) ListListenerFromApiGateway(ctx context.Context, apiGatewayC
return nil, fmt.Errorf("failed to create request: %v", err) return nil, fmt.Errorf("failed to create request: %v", err)
} }
request.Header.Set("Cookie", cookie) request.Header.Set("Cookie", cookie)
resp, err := http.DefaultClient.Do(request) // Create custom transport with TLS config
tr := &http.Transport{
TLSClientConfig: &tls.Config{
InsecureSkipVerify: true, // Skip certificate verification for test environment
},
}
client := &http.Client{Transport: tr}
resp, err := client.Do(request)
if err != nil { if err != nil {
return nil, fmt.Errorf("failed to get listener list: %v", err) return nil, fmt.Errorf("failed to get listener list: %v", err)
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment