feat: allow insecure https in yaml (#553)

This commit is contained in:
yuyutaotao 2025-04-10 16:57:46 +08:00 committed by GitHub
parent 66a5d16d37
commit 9be848b651
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 8 additions and 0 deletions

View File

@ -159,6 +159,9 @@ target:
# boolean, if close the new tabs after the bridge is disconnected, optional, default is false
closeNewTabsAfterDisconnect: <boolean>
# boolean, if allow insecure https certs, optional, default is false
acceptInsecureCerts: <boolean>
# string, the background knowledge to send to the AI model when calling aiAction, optional
aiActionContext: <string>
```

View File

@ -159,6 +159,9 @@ target:
# 是否在桥接断开时关闭新创建的标签页,可选,默认 false
closeNewTabsAfterDisconnect: <boolean>
# 是否忽略 HTTPS 证书错误,可选,默认 false
acceptInsecureCerts: <boolean>
# 在调用 aiAction 时发送给 AI 模型的背景知识,可选
aiActionContext: <string>
```

View File

@ -36,6 +36,7 @@ export interface MidsceneYamlScriptEnv {
// puppeteer only
userAgent?: string;
acceptInsecureCerts?: boolean;
viewportWidth?: number;
viewportHeight?: number;
viewportScale?: number;

View File

@ -105,6 +105,7 @@ export async function launchPuppeteerPage(
headless: !headed,
defaultViewport: viewportConfig,
args,
acceptInsecureCerts: target.acceptInsecureCerts,
});
freeFn.push({
name: 'puppeteer_browser',