chore: add User-Agent to healthcheck request

This commit is contained in:
Jonas Kaninda
2024-11-19 08:37:09 +01:00
parent 75fc6d0552
commit ac17dd8dba

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)