disallow robots index for self hosted deployments

This commit is contained in:
Jori Lallo
2018-01-21 18:47:43 -08:00
parent 1b5513be0c
commit 69af7f4efe
2 changed files with 13 additions and 0 deletions

9
server/utils/robots.js Normal file
View File

@ -0,0 +1,9 @@
// @flow
import { type Context } from 'koa';
const DISALLOW_ROBOTS = `User-agent: *
Disallow: /`;
export const robotsResponse = (ctx: Context): ?string => {
if (ctx.headers.host.indexOf('getoutline.com') < 0) return DISALLOW_ROBOTS;
};