MCPcopy
hub / github.com/github/docs / blockIndex

Function blockIndex

middleware/block-robots.js:20–22  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

18].flat()
19
20export function blockIndex(path) {
21 return pathRegExps.some((pathRe) => pathRe.test(path))
22}
23
24const middleware = function blockRobots(req, res, next) {
25 if (blockIndex(req.path)) res.set('x-robots-tag', 'noindex')

Callers 3

frame.jsFile · 0.90
allowIndexFunction · 0.90
middlewareFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected