From 74bb9568053fa3190579ff1ad3260bbd2c2f38c6 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 Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01H7LwYgJfpkbLCTeiAf8U4A --- 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}`