chore: unified UA settings method

This commit is contained in:
wwqgtxx
2026-02-13 18:11:46 +08:00
parent 05fbf552ec
commit 30391b40c4
2 changed files with 2 additions and 2 deletions

View File

@@ -50,7 +50,7 @@ func HttpRequest(ctx context.Context, url, method string, header map[string][]st
}
}
if _, ok := req.Header["User-Agent"]; !ok {
if req.Header.Get("User-Agent") == "" {
req.Header.Set("User-Agent", UA())
}