Let the capture script take a host-resolver mapping

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01H7LwYgJfpkbLCTeiAf8U4A
This commit is contained in:
2026-08-16 16:59:47 +02:00
co-authored by Claude Fable 5
parent 761a006a2d
commit 74bb956805
+7 -1
View File
@@ -37,7 +37,13 @@ async function withTheme(browser, theme) {
return context return context
} }
const browser = await chromium.launch() // Chromium pins *.localhost to loopback (RFC 6761), so /etc/hosts cannot point
// it at Traefik. The containerised run (root `make verify-docker`) passes the
// mapping through here instead; empty on a host run.
const RESOLVER = process.env.HOST_RESOLVER_RULES
const browser = await chromium.launch(
RESOLVER ? { args: [`--host-resolver-rules=${RESOLVER}`] } : {},
)
for (const theme of ["light", "dark"]) { for (const theme of ["light", "dark"]) {
const dir = `${OUT}/${theme}` const dir = `${OUT}/${theme}`