MCPcopy Create free account
hub / github.com/isomorphic-git/isomorphic-git / updateHeaders

Function updateHeaders

src/managers/GitRemoteHTTP.js:19–28  ·  view source on GitHub ↗
(headers, auth)

Source from the content-addressed store, hash-verified

17 : `${corsProxy}/${url.replace(/^https?:\/\//, '')}`
18
19const updateHeaders = (headers, auth) => {
20 // Update the basic auth header
21 if (auth.username || auth.password) {
22 headers.Authorization = calculateBasicAuthHeader(auth)
23 }
24 // but any manually provided headers take precedence
25 if (auth.headers) {
26 Object.assign(headers, auth.headers)
27 }
28}
29
30/**
31 * @param {GitHttpResponse} res

Callers 2

discoverMethod · 0.85
connectMethod · 0.85

Calls 1

calculateBasicAuthHeaderFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…