A development host is kept out of search engines without IAPL_NOINDEX (developmentNoindex, default on)
Separate from the mail rule so that it can be taken or left. A site whose address matches
iapl({ developmentHosts }) - built in: *.dev.netscale.pl - is noindex with no env: robots.txt disallows
everything, pages carry noindex, IndexNow sends nothing, buildSecurityHeaders() adds X-Robots-Tag. Nothing
kept a development copy out of search engines until now unless somebody set the variable.
- iapl({ developmentNoindex: false }) switches it off for the project, IAPL_NOINDEX=0 for one environment
- buildSecurityHeaders({ developmentHosts, serverUrl }): next.config runs before the plugin
- the mail rule keeps its own two signals: the development pattern, and the variable itself
- changelog "what changes on upgrade", deployment.md, security.md, AGENT.md, skills
Co-Authored-By: Claude Fable 5.2 <[email protected]>
This commit is contained in:
co-authored by
Claude Fable 5.2
parent
14abf369da
commit
bc3aac249f
@@ -5,7 +5,7 @@ import { randomBytes } from 'node:crypto'
|
||||
import type { RelayOptions, ResolvedRelayOptions } from './options.js'
|
||||
|
||||
import { PLUGIN_VERSION } from '../../../version.js'
|
||||
import { isSiteNoindex } from '../../seo/siteNoindex.js'
|
||||
import { noindexEnv } 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,7 +108,8 @@ 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 }}
|
||||
return isSiteNoindex() ? { by: 'noindex' } : null
|
||||
// the variable itself: whether a development host is ALSO kept out of search engines is another question
|
||||
return noindexEnv() === true ? { by: 'noindex' } : null
|
||||
}
|
||||
|
||||
/** Is this site a non-public copy (`siteNonPublicSignal` as a yes or no)? */
|
||||
|
||||
Reference in New Issue
Block a user