Skip to content
This repository has been archived by the owner on Dec 21, 2023. It is now read-only.

Commit

Permalink
Merge pull request #123 from keptn/feature/1167/set-host-if-uncontained
Browse files Browse the repository at this point in the history
#1167 Always set host
  • Loading branch information
agrimmer authored Nov 28, 2019
2 parents cc66213 + da9836b commit a86b5b9
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions pkg/api/utils/apiServiceUtils.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down

0 comments on commit a86b5b9

Please sign in to comment.