mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-27 01:43:59 +01:00
Add User-Agent for gitea's self-implemented lfs client. (#32832)
(cherry picked from commit 82c59d52ea650ce42bbca2c6740d9449d06e77be)
This commit is contained in:
parent
96a7f0a3f0
commit
14a5d177e1
1 changed files with 6 additions and 3 deletions
|
@ -14,9 +14,12 @@ import (
|
||||||
const (
|
const (
|
||||||
// MediaType contains the media type for LFS server requests
|
// MediaType contains the media type for LFS server requests
|
||||||
MediaType = "application/vnd.git-lfs+json"
|
MediaType = "application/vnd.git-lfs+json"
|
||||||
// Some LFS servers offer content with other types, so fallback to '*/*' if application/vnd.git-lfs+json cannot be served
|
// AcceptHeader Some LFS servers offer content with other types, so fallback to '*/*' if application/vnd.git-lfs+json cannot be served
|
||||||
AcceptHeader = "application/vnd.git-lfs+json;q=0.9, */*;q=0.8"
|
AcceptHeader = "application/vnd.git-lfs+json;q=0.9, */*;q=0.8"
|
||||||
UserAgentHeader = "git-lfs"
|
// UserAgentHeader Add User-Agent for gitea's self-implemented lfs client,
|
||||||
|
// and the version is consistent with the latest version of git lfs can be avoided incompatibilities.
|
||||||
|
// Some lfs servers will check this
|
||||||
|
UserAgentHeader = "git-lfs/3.6.0 (Gitea)"
|
||||||
)
|
)
|
||||||
|
|
||||||
// BatchRequest contains multiple requests processed in one batch operation.
|
// BatchRequest contains multiple requests processed in one batch operation.
|
||||||
|
|
Loading…
Reference in a new issue