Skip to content

Commit

Permalink
chore(cloud-function): set X-Robots-Tag header on /contributors.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
caugner committed May 17, 2024
1 parent ae9b1bc commit 8d19447
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cloud-function/src/headers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ export function withContentResponseHeaders(
xFrame: !isLiveSample,
});

if (req.url?.endsWith("/contributors.txt")) {
res.setHeader("X-Robots-Tag", "noindex, nofollow");
}

if (req.url?.endsWith("/sitemap.xml.gz")) {
res.setHeader("Content-Type", "application/xml");
res.setHeader("Content-Encoding", "gzip");
Expand Down

0 comments on commit 8d19447

Please sign in to comment.