(req *http.Request)
| 59 | } |
| 60 | |
| 61 | func (o *httpService) SetOriginServerName(req *http.Request) { |
| 62 | o.transport.DialTLSContext = func(ctx context.Context, network, addr string) (net.Conn, error) { |
| 63 | conn, err := o.transport.DialContext(ctx, network, addr) |
| 64 | if err != nil { |
| 65 | return nil, err |
| 66 | } |
| 67 | return tls.Client(conn, &tls.Config{ |
| 68 | RootCAs: o.transport.TLSClientConfig.RootCAs, |
| 69 | InsecureSkipVerify: o.transport.TLSClientConfig.InsecureSkipVerify, // nolint: gosec |
| 70 | ServerName: req.Host, |
| 71 | }), nil |
| 72 | } |
| 73 | } |
| 74 | |
| 75 | func (o *statusCode) RoundTrip(_ *http.Request) (*http.Response, error) { |
| 76 | if o.defaultResp { |
no test coverage detected