From 391d0aea5d76b965487ff0cec562bb9d2297852e Mon Sep 17 00:00:00 2001 From: stroblme Date: Sun, 16 Aug 2026 16:59:47 +0200 Subject: [PATCH] Let the capture script take a host-resolver mapping --- frontend/scripts/capture-screenshots.mjs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/frontend/scripts/capture-screenshots.mjs b/frontend/scripts/capture-screenshots.mjs index 774781a..db83f88 100644 --- a/frontend/scripts/capture-screenshots.mjs +++ b/frontend/scripts/capture-screenshots.mjs @@ -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}`