Browse Source

13 Added robots.txt to prevent indexing

pull/14/head
Kim Grytøyr 1 year ago
parent
commit
eacc20f67d
Signed by: kim <kim@grytoyr.io> GPG Key ID: 759EF8C94E0B45B7
1 changed files with 9 additions and 0 deletions
  1. +9
    -0
      src/routes/index.js

+ 9
- 0
src/routes/index.js View File

@@ -11,6 +11,15 @@ const upload = multer({ dest: config.path })
const auth = require('../lib/auth');
const paste = require('../lib/paste');

/* GET robots.txt */
router.get('/robots.txt', (req, res, next) => {
res.end(`User-agent: *
User-agent: AdsBot-Google
User-agent: AdsBot-Google-Mobile
User-agent: AdsBot-Google-Mobile-Apps
Disallow: /`, 'binary');
});

/* GET home page. */
router.get('/', (req, res, next) => {
res.render('index', {


Loading…
Cancel
Save