Skip to content

Commit 82c59d5

Browse files
authored
Add User-Agent for gitea's self-implemented lfs client. (#32832)
1 parent bed563e commit 82c59d5

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

modules/lfs/shared.go

+6-3
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,12 @@ import (
1414
const (
1515
// MediaType contains the media type for LFS server requests
1616
MediaType = "application/vnd.git-lfs+json"
17-
// Some LFS servers offer content with other types, so fallback to '*/*' if application/vnd.git-lfs+json cannot be served
18-
AcceptHeader = "application/vnd.git-lfs+json;q=0.9, */*;q=0.8"
19-
UserAgentHeader = "git-lfs"
17+
// AcceptHeader Some LFS servers offer content with other types, so fallback to '*/*' if application/vnd.git-lfs+json cannot be served
18+
AcceptHeader = "application/vnd.git-lfs+json;q=0.9, */*;q=0.8"
19+
// UserAgentHeader Add User-Agent for gitea's self-implemented lfs client,
20+
// and the version is consistent with the latest version of git lfs can be avoided incompatibilities.
21+
// Some lfs servers will check this
22+
UserAgentHeader = "git-lfs/3.6.0 (Gitea)"
2023
)
2124

2225
// BatchRequest contains multiple requests processed in one batch operation.

0 commit comments

Comments
 (0)