Add Cache-Tag headers

This commit is contained in:
MICHAEL JACKSON
2017-08-12 17:23:40 -07:00
parent 5f2805c2e9
commit db69375e9c
8 changed files with 66 additions and 95 deletions

View File

@ -5,7 +5,7 @@ const blacklist = require('../PackageBlacklist').blacklist
*/
function checkBlacklist(req, res, next) {
if (blacklist.includes(req.packageName)) {
res.status(403).send(`Package ${req.packageName} is blacklisted`)
res.status(403).type('text').send(`Package ${req.packageName} is blacklisted`)
} else {
next()
}