Skip to content

Commit 3abeaeb

Browse files
ybelMekktommytroen
andcommitted
fix: set schema for dp-track client
Co-authored-by: Tommy Trøen <[email protected]>
1 parent fb60a59 commit 3abeaeb

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

internal/dependencytrack/dependencytrack.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,10 @@ type Vulnerability struct {
3535
func setupConfig(url, apiKey string) *client.Configuration {
3636
cfg := client.NewConfiguration()
3737
cfg.AddDefaultHeader(ClientXApiKeyHeader, apiKey)
38-
cfg.Scheme = "https"
38+
cfg.Scheme = "http"
39+
if strings.HasPrefix(url, "https") {
40+
cfg.Scheme = "https"
41+
}
3942
cfg.Servers = client.ServerConfigurations{
4043
{
4144
URL: url,

0 commit comments

Comments
 (0)