Skip to content

Commit

Permalink
Merge pull request #304 from mgreminger/nonindex
Browse files Browse the repository at this point in the history
fix: add nonindex header to document data
  • Loading branch information
mgreminger authored Nov 30, 2024
2 parents 15bc53d + e6bb26f commit 43205e8
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions src/database/_worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -279,10 +279,17 @@ async function getSheet({ requestHash, kv, d1, useD1 } :
if (useD1) {
await incrementNumReads(requestHash, d1);
}
return new Response(JSON.stringify({
data: document.data,
history: document.history
}))

const headers = new Headers();
headers.append("X-Robots-Tag", "noindex");

return new Response(
JSON.stringify({
data: document.data,
history: document.history,
}),
{ headers: headers }
);
}
}

Expand Down

0 comments on commit 43205e8

Please sign in to comment.