git ssb

0+

Daan Patchwork / ssb-viewer



forked from cel / ssb-viewer

Commit c8c744f585c7b47c5bc661ec8df7d5caf8d21ed8

Default to disallow robots

cel committed on 8/22/2018, 6:52:43 PM
Parent: f908ea40e6521e38fb50bce65d3f4bf95be556a6

Files changed

README.mdchanged
index.jschanged
README.mdView
@@ -82,9 +82,9 @@
8282 - `viewer.blob_base`: base url for links to ssb blobs
8383 - `viewer.img_base`: base url for embedded blobs (images)
8484 - `viewer.emoji_base`: base url for emoji images
8585 - `viewer.require_opt_in`: whether to serve content from feeds that have not published a `publicWebHosting` `about` message. default: `true`
86-- `viewer.disallowRobots`: whether to direct search engines to not index the site. default: `false`
86+- `viewer.disallowRobots`: whether to direct search engines to not index the site. default: `true`
8787
8888 ## References
8989
9090 - Concept: [ssb-porthole][]
index.jsView
@@ -534,10 +534,11 @@
534534 })
535535 }
536536
537537 function serveRobots(req, res, conf) {
538- res.end('User-agent: *'
539- + (conf.disallowRobots ? '\nDisallow: /' : ''))
538+ var disallow = conf.disallowRobots == null ? true : conf.disallowRobots
539+ res.end('User-agent: *\n'
540+ + (disallow ? 'Disallow: /\n' : ''))
540541 }
541542
542543 function prepend(fn, arg) {
543544 return function (read) {

Built with git-ssb-web