diff options
author | Rigel Kent <sendmemail@rigelk.eu> | 2018-05-15 00:29:40 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-05-16 10:50:55 +0200 |
commit | ac235c37e2d7112efbc182e0179cb27e75ef09a1 (patch) | |
tree | 1b209b83a399b3d91229f55d74a1e7f414d5e2cb /server/controllers/static.ts | |
parent | 2efd32f697549c59337db5177a93749af8e605d8 (diff) | |
download | PeerTube-ac235c37e2d7112efbc182e0179cb27e75ef09a1.tar.gz PeerTube-ac235c37e2d7112efbc182e0179cb27e75ef09a1.tar.zst PeerTube-ac235c37e2d7112efbc182e0179cb27e75ef09a1.zip |
robots.txt config and route
Diffstat (limited to 'server/controllers/static.ts')
-rw-r--r-- | server/controllers/static.ts | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/server/controllers/static.ts b/server/controllers/static.ts index eece9c06b..c1bf384a4 100644 --- a/server/controllers/static.ts +++ b/server/controllers/static.ts | |||
@@ -44,6 +44,12 @@ staticRouter.use( | |||
44 | asyncMiddleware(getPreview) | 44 | asyncMiddleware(getPreview) |
45 | ) | 45 | ) |
46 | 46 | ||
47 | // robots.txt service | ||
48 | staticRouter.get('/robots.txt', (req: express.Request, res: express.Response) => { | ||
49 | res.type('text/plain') | ||
50 | return res.send(CONFIG.INSTANCE.ROBOTS) | ||
51 | }) | ||
52 | |||
47 | // --------------------------------------------------------------------------- | 53 | // --------------------------------------------------------------------------- |
48 | 54 | ||
49 | export { | 55 | export { |