Files
zeekay 58bf43fe13 Name the thing instead of calling it a door
One word stood for several: the MCP server, one address that accepts requests,
the single way in, and the boundary a credential is validated at. Each site now
names its own sense — endpoint, entry point, the MCP server, the edge, address,
relay — or, where none of those fit, takes the word the surrounding code already
uses.

Prose and comments only, 1:1 line for line. Identifiers keep their names: CSS
classes, DOM ids, struct fields, enum variants, config values and the doc
comments that must open with the identifier they document.
2026-08-23 14:43:48 -07:00

20 lines
664 B
JavaScript

/**
* Keep the private surfaces out of search, leave the landing in.
*
* `/` is the signed-out PRODUCT landing (the app is the landing, 2026-07-28),
* so it must be indexable — a public product nobody can find is not
* self-service. What must never be a search result is a specific conversation
* or a shared thread (`/c/*`, `/share/*`) and the API (`/v1/*`). This used to
* noindex every response, including the landing.
*/
const PRIVATE = [/^\/v1\//, /^\/c\//, /^\/share\//];
const noIndex = (req, res, next) => {
if (PRIVATE.some((p) => p.test(req.path))) {
res.setHeader('X-Robots-Tag', 'noindex');
}
next();
};
module.exports = noIndex;