Let the capture script take a host-resolver mapping

This commit is contained in:
2026-08-16 16:59:47 +02:00
parent 0be8bf5713
commit 391d0aea5d
+7 -1
View File
@@ -37,7 +37,13 @@ async function withTheme(browser, theme) {
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"]) {
const dir = `${OUT}/${theme}`