Disallow scratch papers to be crawled by robots
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
const path = require('path');
|
||||
const express = require('express');
|
||||
const app = express();
|
||||
|
||||
@@ -18,6 +19,9 @@ app.use((req, res, next) => {
|
||||
next();
|
||||
}
|
||||
});
|
||||
app.get('/robots.txt', (req, res) => {
|
||||
res.sendFile(path.resolve(__dirname, '..', 'robots.txt'));
|
||||
});
|
||||
app.use(apiEndpoint, backend);
|
||||
app.use(frontend);
|
||||
|
||||
|
||||
2
robots.txt
Normal file
2
robots.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
User-agent: *
|
||||
Disallow: /scratch-paper/
|
||||
Reference in New Issue
Block a user