diff --git a/pkg/api/utils/apiServiceUtils.go b/pkg/api/utils/apiServiceUtils.go index f293b0a0..1bdbb717 100644 --- a/pkg/api/utils/apiServiceUtils.go +++ b/pkg/api/utils/apiServiceUtils.go @@ -5,11 +5,9 @@ import ( "crypto/tls" "encoding/json" "fmt" + "github.com/keptn/go-utils/pkg/api/models" "io/ioutil" "net/http" - "strings" - - "github.com/keptn/go-utils/pkg/api/models" ) // APIService represents the interface for accessing the configuration service @@ -32,9 +30,7 @@ func post(uri string, data []byte, api APIService) (*models.EventContext, *model req, err := http.NewRequest("POST", uri, bytes.NewBuffer(data)) req.Header.Set("Content-Type", "application/json") - if !strings.Contains(uri, "api.keptn") { - req.Host = "api.keptn" - } + req.Host = "api.keptn" addAuthHeader(req, api) resp, err := api.getHTTPClient().Do(req)