Skip to content

Commit 3877cd3

Browse files
committed
Hide Chrome warning fixes from the intercepted requests
1 parent 42467fc commit 3877cd3

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/hide-chrome-warning-server.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@ export class HideChromeWarningServer {
4949
`);
5050
}
5151

52+
get host(): string {
53+
return this.server!.url
54+
.replace('https://', '');
55+
}
56+
5257
get hideWarningUrl(): string {
5358
return this.server.url.replace(/\/?$/, '/hide-chrome-warning');
5459
}

src/interceptors/fresh-chrome.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ export class FreshChrome {
4646
const browser = await launchBrowser(hideWarningServer.hideWarningUrl, {
4747
browser: 'chrome',
4848
proxy: `https://localhost:${proxyPort}`,
49+
// Don't intercept our warning hiding requests
50+
noProxy: hideWarningServer.host,
4951
options: [
5052
`--ignore-certificate-errors-spki-list=${spkiFingerprint}`
5153
]

0 commit comments

Comments
 (0)