Temporarily disable daily downloads check
This commit is contained in:
parent
d63288fb27
commit
6c6f8814a3
|
@ -21,7 +21,10 @@ const PackageBlacklist = require('./PackageBlacklist').blacklist
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The minimum number of times a package must be downloaded on
|
* The minimum number of times a package must be downloaded on
|
||||||
* average in order to be available on the CDN.
|
* average in order to be available on the CDN. We need to set this
|
||||||
|
* sufficiently high to avoid serving packages that are only ever
|
||||||
|
* downloaded by bots.
|
||||||
|
* See https://twitter.com/seldo/status/892840020377075712
|
||||||
*/
|
*/
|
||||||
const MinDailyDownloads = 50
|
const MinDailyDownloads = 50
|
||||||
|
|
||||||
|
@ -84,7 +87,7 @@ function createServer() {
|
||||||
app.use('/_meta',
|
app.use('/_meta',
|
||||||
parsePackageURL,
|
parsePackageURL,
|
||||||
checkBlacklist(PackageBlacklist),
|
checkBlacklist(PackageBlacklist),
|
||||||
checkMinDailyDownloads(MinDailyDownloads),
|
// checkMinDailyDownloads(MinDailyDownloads),
|
||||||
fetchFile,
|
fetchFile,
|
||||||
serveMetadata
|
serveMetadata
|
||||||
)
|
)
|
||||||
|
@ -96,7 +99,7 @@ function createServer() {
|
||||||
app.use('/',
|
app.use('/',
|
||||||
parsePackageURL,
|
parsePackageURL,
|
||||||
checkBlacklist(PackageBlacklist),
|
checkBlacklist(PackageBlacklist),
|
||||||
checkMinDailyDownloads(MinDailyDownloads),
|
// checkMinDailyDownloads(MinDailyDownloads),
|
||||||
fetchFile,
|
fetchFile,
|
||||||
serveFile
|
serveFile
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue