diff --git a/lib/datasource/docker/index.js b/lib/datasource/docker/index.js index 83cd7e40fc7b9e251c8ee8b8c6c1534cee80aa07..f9e0b8d49c826fdc0275b6757c6e9eeb75a9e0ab 100644 --- a/lib/datasource/docker/index.js +++ b/lib/datasource/docker/index.js @@ -55,7 +55,7 @@ async function getAuthHeaders(registry, repository) { const auth = Buffer.from(`${opts.username}:${opts.password}`).toString( 'base64' ); - opts.headers = { Authorization: `Basic ${auth}` }; + opts.headers = { authorization: `Basic ${auth}` }; } if (authenticateHeader.scheme.toUpperCase() === 'BASIC') { @@ -76,7 +76,7 @@ async function getAuthHeaders(registry, repository) { return null; } return { - Authorization: `Bearer ${token}`, + authorization: `Bearer ${token}`, }; } catch (err) /* istanbul ignore next */ { if (err.statusCode === 401) { diff --git a/lib/datasource/packagist/index.js b/lib/datasource/packagist/index.js index 34d94ed1146ff7150ddaff6827996125f6a1f3bc..3a94d75c736be2b6c5ca1a8ddfb387525474de96 100644 --- a/lib/datasource/packagist/index.js +++ b/lib/datasource/packagist/index.js @@ -73,7 +73,7 @@ async function getPackagistFile(regUrl, file) { const { key, sha256 } = file; const fileName = key.replace('%hash%', sha256); const opts = getHostOpts(regUrl); - if (opts.auth || (opts.headers && opts.headers.Authorization)) { + if (opts.auth || (opts.headers && opts.headers.authorization)) { return (await got(regUrl + '/' + fileName, opts)).body; } const cacheNamespace = 'datasource-packagist-files';