Skip to content

Commit

Permalink
refactor(chalice): added 'noindex' header to prevent API indexing
Browse files Browse the repository at this point in the history
  • Loading branch information
tahayk committed Apr 26, 2024
1 parent a99999c commit 8e0b801
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions api/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
1 change: 1 addition & 0 deletions ee/api/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down

0 comments on commit 8e0b801

Please sign in to comment.