closes #732, custom robots.txt

This commit is contained in:
psychobunny
2014-01-05 23:19:52 -05:00
parent 0e5358a701
commit 6f120ff34a
2 changed files with 16 additions and 3 deletions

View File

@@ -754,9 +754,14 @@ if(nconf.get('ssl')) {
app.get('/robots.txt', function (req, res) {
res.set('Content-Type', 'text/plain');
res.send("User-agent: *\n" +
"Disallow: /admin/\n" +
"Sitemap: " + nconf.get('url') + "sitemap.xml");
if (meta.config["robots.txt"]) {
res.send(meta.config["robots.txt"])
} else {
res.send("User-agent: *\n" +
"Disallow: /admin/\n" +
"Sitemap: " + nconf.get('url') + "sitemap.xml");
}
});
app.get('/recent.rss', function(req, res) {