【发布时间】:2015-07-02 00:31:16
【问题描述】:
我有一个带有这个 package.json 的 nw.js 应用程序:
{
"main": "index.html",
"name": "test_app",
"window": {
"toolbar": false,
"position": "center",
"min_width": 800,
"min_height": 500,
"as_desktop": true,
"resizable": true,
"frame": true,
"chromium-args": "--ignore-certificate-errors"
},
"webkit": {
"plugin": true,
"page-cache": true
}
}
我的 index.html 包含以下代码:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>demo</title>
</head>
<body>
<iframe src="https://www.example.com"></iframe>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script>
function myfunc(){
alert("my func");
}
</script>
</body>
</html>
问题:
我的网站(iframe 的源代码)https://www.example.com 有一个自签名证书,所以如果我尝试在控制台中加载,给我这个错误:
Failed to load resource: net::ERR_INSECURE_RESPONSE
为什么--ignore-certificate-errors 不在 iframe 子级中扩展?
提前致谢!
【问题讨论】:
标签: node-webkit nw.js