mirror of
https://github.com/httprunner/httprunner.git
synced 2026-06-11 02:39:46 +08:00
fix: use localhost instead of 127.0.0.1
This commit is contained in:
@@ -272,7 +272,7 @@ func (s *DriverSession) Request(method string, urlStr string, rawBody []byte) (
|
||||
func (s *DriverSession) SetupPortForward(localPort int) error {
|
||||
s.client.Transport = &http.Transport{
|
||||
DialContext: func(ctx context.Context, network, addr string) (net.Conn, error) {
|
||||
return net.Dial(network, fmt.Sprintf("127.0.0.1:%d", localPort))
|
||||
return net.Dial(network, fmt.Sprintf("localhost:%d", localPort))
|
||||
},
|
||||
MaxIdleConns: 10,
|
||||
IdleConnTimeout: 30 * time.Second,
|
||||
|
||||
Reference in New Issue
Block a user