From f6fb7caca2d623901bab67d1ea07b62e605dcd03 Mon Sep 17 00:00:00 2001 From: Christophe Jossart Date: Thu, 30 Jan 2025 11:29:01 +0100 Subject: [PATCH] chore(SLB-478): prevent indexing (#1601) --- packages/npm/@amazeelabs/publisher/src/server.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/npm/@amazeelabs/publisher/src/server.ts b/packages/npm/@amazeelabs/publisher/src/server.ts index 933f678b3..2d55154f6 100644 --- a/packages/npm/@amazeelabs/publisher/src/server.ts +++ b/packages/npm/@amazeelabs/publisher/src/server.ts @@ -49,6 +49,12 @@ const runServer = async (): Promise => { // Authentication middleware based on the configuration. const authMiddleware = getAuthenticationMiddleware(getConfig()); + // Prevent indexing. + app.use((_, res, next) => { + res.setHeader('X-Robots-Tag', 'noindex, nofollow'); + next(); + }); + // Allow cross-origin requests // @TODO see if we need to lock this down // Default config: