mirror of
https://github.com/RuoJi6/ARTEX.git
synced 2026-11-13 14:03:49 +08:00
fix: make HTTP user agents configurable and remove tool identifiers
This commit is contained in:
1 parent
40746901db
commit
17c2fc5e08
30 files changed
+1204
-26
No files matched your search
@@ -9,6 +9,8 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/Autumn-27/artex/internal/httpidentity"
|
||||
)
|
||||
|
||||
// Repo 是发布源。写死而不是做成配置项:更新源可配等于给任何能改配置的人一条
|
||||
@@ -125,7 +127,7 @@ func FetchLatest(ctx context.Context, c *http.Client) (*Release, error) {
|
||||
return nil, err
|
||||
}
|
||||
req.Header.Set("Accept", "application/vnd.github+json")
|
||||
req.Header.Set("User-Agent", "artex-selfupdate")
|
||||
httpidentity.ApplyRequired(req)
|
||||
|
||||
resp, err := c.Do(req)
|
||||
if err != nil {
|
||||
|
||||
Reference in new issue
Block a user