From 761d7a6748d21d866a14f44a3f6f29b085e205a7 Mon Sep 17 00:00:00 2001 From: Kraiem Taha Yassine Date: Fri, 26 Apr 2024 11:04:11 +0200 Subject: [PATCH] Dev (#2142) * fix(chalice): fixed sourcemaps URL * refactor(chalice): added 'noindex' header to prevent API indexing --- api/app.py | 1 + ee/api/app.py | 1 + 2 files changed, 2 insertions(+) diff --git a/api/app.py b/api/app.py index 36d2b69b3..fd7152be0 100644 --- a/api/app.py +++ b/api/app.py @@ -92,6 +92,7 @@ async def or_middleware(request: Request, call_next): if now > 2: now = round(now, 2) logging.warning(f"Execution time: {now} s for {request.method}: {request.url.path}") + response.headers["x-robots-tag"] = 'noindex, nofollow' return response diff --git a/ee/api/app.py b/ee/api/app.py index 27aa9b70a..3b1773cb4 100644 --- a/ee/api/app.py +++ b/ee/api/app.py @@ -110,6 +110,7 @@ async def or_middleware(request: Request, call_next): if now > 2: now = round(now, 2) logging.warning(f"Execution time: {now} s for {request.method}: {request.url.path}") + response.headers["x-robots-tag"] = 'noindex, nofollow' return response