forked from Elara6331/itd
Fix invalid user agent error
This commit is contained in:
parent
669788034f
commit
254b675f2c
@ -259,7 +259,7 @@ func getWeather(ctx context.Context, lat, lon float64) (*METResponse, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Set identifying user agent as per NMI requirements
|
// Set identifying user agent as per NMI requirements
|
||||||
req.Header.Set("User-Agent", fmt.Sprintf("ITD/%s gitea.arsenm.dev/Arsen6331/itd", version))
|
req.Header.Set("User-Agent", fmt.Sprintf("ITD/%s gitea.arsenm.dev/Arsen6331/itd", strings.TrimSpace(version)))
|
||||||
|
|
||||||
// Perform request
|
// Perform request
|
||||||
res, err := http.DefaultClient.Do(req)
|
res, err := http.DefaultClient.Do(req)
|
||||||
|
Loading…
Reference in New Issue
Block a user