mirror of
https://github.com/go-gitea/gitea
synced 2024-12-22 16:44:26 +00:00
parent
a03fdd9566
commit
0b8a8941a0
@ -236,6 +236,7 @@ func createRequest(ctx context.Context, method, url string, headers map[string]s
|
|||||||
req.Header.Set(key, value)
|
req.Header.Set(key, value)
|
||||||
}
|
}
|
||||||
req.Header.Set("Accept", AcceptHeader)
|
req.Header.Set("Accept", AcceptHeader)
|
||||||
|
req.Header.Set("User-Agent", UserAgentHeader)
|
||||||
|
|
||||||
return req, nil
|
return req, nil
|
||||||
}
|
}
|
||||||
|
@ -16,6 +16,7 @@ const (
|
|||||||
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
|
// 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"
|
||||||
)
|
)
|
||||||
|
|
||||||
// BatchRequest contains multiple requests processed in one batch operation.
|
// BatchRequest contains multiple requests processed in one batch operation.
|
||||||
|
Loading…
Reference in New Issue
Block a user