Commit 1a864ebd authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 13f6a040
......@@ -236,8 +236,16 @@ func handleGetBlobRaw(w http.ResponseWriter, r *gitRequest) {
}
}
// Extract only tokens from headers
h := url.Values{}
for k, v := range r.Request.Header {
if strings.HasSuffix(strings.ToUpper(k), "-TOKEN") {
h[k] = v
}
}
// Query download access auth for this project
authReply := verifyDownloadAccess(r.u, project, query.Encode())
authReply := verifyDownloadAccess(r.u, project, query.Encode(), h)
if authReply.RepoPath == "" {
// access denied - copy auth reply to client in full -
// there are HTTP code and other headers / body relevant for
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment