Default to disallow robots

This commit is contained in:
cel
2018-08-22 11:52:43 -07:00
parent f908ea40e6
commit c8c744f585
2 changed files with 4 additions and 3 deletions
+3 -2
View File
@@ -535,8 +535,9 @@ function serveFile(req, res, file) {
}
function serveRobots(req, res, conf) {
res.end('User-agent: *'
+ (conf.disallowRobots ? '\nDisallow: /' : ''))
var disallow = conf.disallowRobots == null ? true : conf.disallowRobots
res.end('User-agent: *\n'
+ (disallow ? 'Disallow: /\n' : ''))
}
function prepend(fn, arg) {