Add robots.txt

merge-requests/43/head
Moe 2018-12-04 08:34:59 -08:00
parent c91ce87ec7
commit 96c6d1de19
2 changed files with 11 additions and 0 deletions

View File

@ -1865,4 +1865,13 @@ module.exports = function(s,config,lang,app,io){
s.closeJsonResponse(res,endData)
},res,req)
})
/**
* Robots.txt
*/
app.get('/robots.txt', function (req,res){
res.on('finish',function(){
res.end()
})
fs.createReadStream(s.mainDirectory + '/web/pages/robots.txt').pipe(res)
})
}

2
web/pages/robots.txt Normal file
View File

@ -0,0 +1,2 @@
User-agent: *
Disallow: /