Skip to content

Commit

Permalink
Update pkg/power/platform/source/redfish_util.go
Browse files Browse the repository at this point in the history
Co-authored-by: Takuya Iwatsuka <[email protected]>
Signed-off-by: Huamin Chen <[email protected]>
  • Loading branch information
rootfs and tiwatsuka authored Jul 14, 2023
1 parent a79d297 commit e686407
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pkg/power/platform/source/redfish_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,13 @@ func getRedfishModel(access RedfishAccessInfo, endpoint string, model interface{
host := access.Host

// Create a HTTP client and set up the basic authentication header
client := &http.Client{}
transport := &http.Transport{}
if config.GetRedfishSkipSSLVerify() {
transport.TLSClientConfig = &tls.Config{InsecureSkipVerify: true}
}
client := &http.Client{
Transport: transport,
}
url := host + endpoint
req, err := http.NewRequest("GET", url, http.NoBody)
if err != nil {
Expand Down

0 comments on commit e686407

Please sign in to comment.