Revert "A development host is kept out of search engines without IAPL_NOINDEX (developmentNoindex, default on)"

This reverts commit bc3aac249f.
This commit is contained in:
Radosław Smoliński
2026-11-26 10:38:29 +01:00
parent 463b966365
commit 5df5358768
23 changed files with 24 additions and 215 deletions
+2 -3
View File
@@ -5,7 +5,7 @@ import { randomBytes } from 'node:crypto'
import type { RelayOptions, ResolvedRelayOptions } from './options.js'
import { PLUGIN_VERSION } from '../../../version.js'
import { noindexEnv } from '../../seo/siteNoindex.js'
import { isSiteNoindex } from '../../seo/siteNoindex.js'
import { matchDevelopmentHost } from '../../shared/developmentHosts.js'
import { type RelayAnswer, type RelayRefusal, relayRequest } from './client.js'
import { RELAY_CONFIRM_PATH, RELAY_DEFAULTS, RELAY_PRODUCT, type RelayStatusCode, relayStatusFor } from './constants.js'
@@ -108,8 +108,7 @@ export type NonPublicSignal = { by: 'development-host'; pattern: string } | { by
export function siteNonPublicSignal(payload: BasePayload, options: Pick<RelayOptions, 'developmentHosts' | 'host'>): NonPublicSignal | null {
const pattern = matchDevelopmentHost(relayHost(payload, options), options.developmentHosts ?? pluginDevelopmentHosts(payload))
if (pattern) {return { by: 'development-host', pattern }}
// the variable itself: whether a development host is ALSO kept out of search engines is another question
return noindexEnv() === true ? { by: 'noindex' } : null
return isSiteNoindex() ? { by: 'noindex' } : null
}
/** Is this site a non-public copy (`siteNonPublicSignal` as a yes or no)? */