Merge pull request #120 from jkaninda/refactor

chore: add User-Agent to healthcheck request
This commit is contained in:
2024-11-19 08:38:55 +01:00
committed by GitHub

View File

@@ -43,6 +43,8 @@ func (health Health) Check() error {
InsecureSkipVerify: health.InsecureSkipVerify, // Skip SSL certificate verification
},
}
// Set user-agent
healthReq.Header.Set("User-Agent", fmt.Sprintf("Goma-Gateway/%s", util.Version))
// Perform the request to the route's healthcheck
client := &http.Client{Transport: transport, Timeout: health.TimeOut}
healthResp, err := client.Do(healthReq)