Default to disallow robots
This commit is contained in:
@@ -83,7 +83,7 @@ e.g. `--viewer.port 8807`.
|
||||
- `viewer.img_base`: base url for embedded blobs (images)
|
||||
- `viewer.emoji_base`: base url for emoji images
|
||||
- `viewer.require_opt_in`: whether to serve content from feeds that have not published a `publicWebHosting` `about` message. default: `true`
|
||||
- `viewer.disallowRobots`: whether to direct search engines to not index the site. default: `false`
|
||||
- `viewer.disallowRobots`: whether to direct search engines to not index the site. default: `true`
|
||||
|
||||
## References
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user