mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
fix: open 0.0.0.0 as localhost (#29054)
Fixes https://github.com/microsoft/playwright/issues/29047
This commit is contained in:
parent
b5e766e99e
commit
4a45724633
@ -168,7 +168,7 @@ export async function openTraceInBrowser(traceUrls: string[], options?: OpenTrac
|
|||||||
// eslint-disable-next-line no-console
|
// eslint-disable-next-line no-console
|
||||||
console.log('\nListening on ' + url);
|
console.log('\nListening on ' + url);
|
||||||
if (!isUnderTest())
|
if (!isUnderTest())
|
||||||
await open(url).catch(() => {});
|
await open(url.replace('0.0.0.0', 'localhost')).catch(() => {});
|
||||||
}
|
}
|
||||||
|
|
||||||
class StdinServer implements Transport {
|
class StdinServer implements Transport {
|
||||||
|
|||||||
@ -181,6 +181,7 @@ export async function showHTMLReport(reportFolder: string | undefined, host: str
|
|||||||
console.log(colors.cyan(` Serving HTML report at ${url}. Press Ctrl+C to quit.`));
|
console.log(colors.cyan(` Serving HTML report at ${url}. Press Ctrl+C to quit.`));
|
||||||
if (testId)
|
if (testId)
|
||||||
url += `#?testId=${testId}`;
|
url += `#?testId=${testId}`;
|
||||||
|
url = url.replace('0.0.0.0', 'localhost');
|
||||||
await open(url, { wait: true }).catch(() => {});
|
await open(url, { wait: true }).catch(() => {});
|
||||||
await new Promise(() => {});
|
await new Promise(() => {});
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user