fix: code scanning alerts (#2750)

This commit is contained in:
Tom Moor
2021-11-08 22:46:30 -08:00
committed by GitHub
parent 87e8ef8fe6
commit 6a64dfe4b2
5 changed files with 8 additions and 10 deletions

View File

@@ -5,5 +5,7 @@ const DISALLOW_ROBOTS = `User-agent: *
Disallow: /`;
export const robotsResponse = (ctx: Context): ?string => {
if (ctx.headers.host.indexOf("getoutline.com") < 0) return DISALLOW_ROBOTS;
if (process.env.DEPLOYMENT !== "hosted") {
return DISALLOW_ROBOTS;
}
};