🚧 Switch to monorepo with Turbo
This commit is contained in:
17
apps/api/extensions/hooks/robots-txt/src/index.js
Normal file
17
apps/api/extensions/hooks/robots-txt/src/index.js
Normal file
@@ -0,0 +1,17 @@
|
||||
const customRobotsTxt = `
|
||||
User-agent: Twitterbot
|
||||
Allow: /
|
||||
|
||||
User-agent: *
|
||||
Disallow: /
|
||||
`.trim()
|
||||
|
||||
export default ({ init }) => {
|
||||
init('app.before', ({ app }) => {
|
||||
app.get('/robots.txt', (_, res) => {
|
||||
res.set('Content-Type', 'text/plain')
|
||||
res.status(200)
|
||||
res.send(customRobotsTxt)
|
||||
})
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user