Skip to content

Commit

Permalink
Avoid SetDownstreamProxy call if an error in url parsing occurs
Browse files Browse the repository at this point in the history
  • Loading branch information
denandz committed Oct 30, 2023
1 parent c19a3aa commit b58cda1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion proxy/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,9 @@ func StartProxy(logger *modifier.Logger, config *Config) *martian.Proxy {
proxyURL, err := url.Parse(config.Proxy)
if err != nil {
log.Printf("martian: error parsing upstream proxy URL: %v, skipping proxy\n", err)
} else {
p.SetDownstreamProxy(proxyURL)
}
p.SetDownstreamProxy(proxyURL)
}

var x509c *x509.Certificate
Expand Down

0 comments on commit b58cda1

Please sign in to comment.