mirror of
https://github.com/projectdiscovery/nuclei.git
synced 2025-12-18 07:15:25 +00:00
bugfix: preserve original transport for linear http client (#6357)
This commit is contained in:
parent
05f69a6b24
commit
06707ea76f
@ -54,15 +54,17 @@ type Options struct {
|
|||||||
|
|
||||||
// New creates a new issue tracker integration client based on options.
|
// New creates a new issue tracker integration client based on options.
|
||||||
func New(options *Options) (*Integration, error) {
|
func New(options *Options) (*Integration, error) {
|
||||||
|
var transport http.RoundTripper = http.DefaultTransport
|
||||||
|
if options.HttpClient != nil && options.HttpClient.HTTPClient.Transport != nil {
|
||||||
|
transport = options.HttpClient.HTTPClient.Transport
|
||||||
|
}
|
||||||
|
|
||||||
httpClient := &http.Client{
|
httpClient := &http.Client{
|
||||||
Transport: &addHeaderTransport{
|
Transport: &addHeaderTransport{
|
||||||
T: http.DefaultTransport,
|
T: transport,
|
||||||
Key: options.APIKey,
|
Key: options.APIKey,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
if options.HttpClient != nil {
|
|
||||||
httpClient.Transport = options.HttpClient.HTTPClient.Transport
|
|
||||||
}
|
|
||||||
|
|
||||||
integration := &Integration{
|
integration := &Integration{
|
||||||
url: "https://api.linear.app/graphql",
|
url: "https://api.linear.app/graphql",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user