From accf8a365c28fe53ca9abb60df320e7b942b0a5b Mon Sep 17 00:00:00 2001 From: Christophe Jossart Date: Fri, 29 Nov 2024 15:48:57 +0100 Subject: [PATCH] chore(SLB-478): prevent indexing --- 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: