Mail relay: development hosts are known by pattern, with no env - built in: *.dev.netscale.pl
The launch rule called a site non-public only when IAPL_NOINDEX was set (or the project named its hosts).
The owner's development sites set nothing, so production's database copied onto a development address
counted as a launch and would have mailed real people.
- iapl({ developmentHosts }): host patterns of development addresses. Default DEFAULT_DEVELOPMENT_HOSTS =
['*.dev.netscale.pl'], Intecion's own development domain; a project replaces the list or empties it.
mail.relay.developmentHosts overrides it for the mail service.
- a site whose host matches is non-public exactly as with IAPL_NOINDEX=1; either signal is enough
- siteNonPublicSignal, matchDevelopmentHost, isDevelopmentHost, pluginDevelopmentHosts exported
- panel state: nonPublicBy, nonPublicPattern; doctor: mail-non-public (info) names the signal
- every case of the launch table runs with no env on the built-in pattern
- docs, AGENT.md, skills, changelog draft
Co-Authored-By: Claude Fable 5.2 <[email protected]>
This commit is contained in:
co-authored by
Claude Fable 5.2
parent
634908eb57
commit
14abf369da
@@ -4,6 +4,7 @@ import { describe, expect, test, vi } from 'vitest'
|
||||
|
||||
import type { I18nConfig } from '../src/modules/i18n/types.js'
|
||||
|
||||
import { pluginDevelopmentHosts } from '../src/modules/email/relay/options.js'
|
||||
import { iapl } from '../src/plugin.js'
|
||||
import { withTotpParts } from './helpers.js'
|
||||
|
||||
@@ -22,6 +23,16 @@ const base = (): Config =>
|
||||
}) as unknown as Config
|
||||
|
||||
describe('iapl — config transform', () => {
|
||||
test('developmentHosts: nothing in the config by default (the built-in list applies), the project\'s list when given, an empty list too', async () => {
|
||||
const hosts = async (own?: string[]) => {
|
||||
const config = await iapl({ access: { authCollection: 'users' }, i18n, twoFactor: false, ...(own ? { developmentHosts: own } : {}) })(base())
|
||||
return pluginDevelopmentHosts({ config } as never)
|
||||
}
|
||||
expect(await hosts()).toEqual(['*.dev.netscale.pl'])
|
||||
expect(await hosts(['*.preview.agency-example.com'])).toEqual(['*.preview.agency-example.com'])
|
||||
expect(await hosts([])).toEqual([])
|
||||
})
|
||||
|
||||
test('adds globals, endpoint, localization and roles', async () => {
|
||||
const config = await iapl({ access: { authCollection: 'users' }, i18n, twoFactor: false })(base())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user