Payload's colour-scheme client hints go to the admin only: withSecurityConfig outside withPayload
withPayload adds Accept-CH, Critical-CH and Vary: Sec-CH-Prefers-Color-Scheme for /:path*; Critical-CH makes
Chrome repeat the first document request of a visit to a public page. As the outer wrapper, withSecurityConfig
moves the three headers to /admin/:path* (adminClientHints: { route, sources } | false). Inside withPayload
nothing changes, so an unedited site behaves as before. Exports scopeColorSchemeClientHints,
adminClientHintSources, COLOR_SCHEME_CLIENT_HINT; doctor rule client-hints (info); reference site and starter
use the new order; e2e:built and the starter gate check it.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
This commit is contained in:
co-authored by
Claude Fable 5.2
parent
2f6a81acbf
commit
9143c132a3
@@ -171,6 +171,8 @@ async function main() {
|
||||
const headers = home.headers
|
||||
check('GET /pl', home.status === 200, String(home.status))
|
||||
check('CSP report-only, no X-Powered-By', headers.has('content-security-policy-report-only') && !headers.has('x-powered-by'))
|
||||
// Payload's colour-scheme client hints belong to the admin only (withSecurityConfig outside withPayload)
|
||||
check('no Accept-CH / Critical-CH on /pl', !headers.has('accept-ch') && !headers.has('critical-ch'), headers.get('critical-ch') ?? headers.get('accept-ch') ?? '')
|
||||
const llms = await (await fetch(`http://127.0.0.1:${PORT}/llms.txt`)).text()
|
||||
check('llms.txt names the site', llms.includes('Release Check'))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user