fix: code scanning alerts (#2750)
This commit is contained in:
@@ -18,7 +18,7 @@ export default function present(
|
||||
// the context contains <b> tags around search terms, we convert them here
|
||||
// to the markdown format that slack expects to receive.
|
||||
const text = context
|
||||
? context.replace(/<\/?b>/g, "*").replace("\n", "")
|
||||
? context.replace(/<\/?b>/g, "*").replace(/\n/g, "")
|
||||
: document.getSummary();
|
||||
|
||||
return {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user