在我的AWS Canary Puppeteer脚本中安装SSL证书
我正在尝试编写一个用于测试我的API的脚本,该脚本已在CloudWatch Synthetics(Canary)中部署在AWS EKS中。 但是我看不到将我的证书和键以及我的API请求以及我的API请求以及键的规定。
如何与API的请求标头一起插入证书? 在我的本地,我使用FS附加证书并将其附加到Axios标题。 如果需要在Puppeteer脚本中附加证书,我该如何实现?
引用的错误消息
读取tlswrap.unstreamread(nestern/stream_base_commons.js:209:20)的读取econnreset
I am trying to write a script for testing my API which is deployed in AWS EKS in Cloudwatch synthetics (Canary).
But I don't see the provision to add my certificate and key along with my API request.
How can I insert certificate along with the request header of the API?
In my local I am appending the certificates using fs and append it to the axios headers.
If the certificate needs to be append in puppeteer script, how can I achieve it?
Error message for reference
ERROR: Request failed. Request: https://myapirequestdns.com/api/v1.0/testroute/testdomain
ERROR: Failure reason: Error: read ECONNRESET Stack: Error: read ECONNRESET at TLSWrap.onStreamRead (internal/stream_base_commons.js:209:20) at TLSWrap.callbackTrampoline (internal/async_hooks.js:130:17)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是我们在运行
syn-nodejs-puppeTeer-3.5
检索并使用AWS Secrets Manager的CADERIVE和使用CA的Canary函数顶部使用的代码:然后
apicanaryblueprint
功能,加载键/cert/ca,然后在设置
request> requestOptions
时,指定键>键
,cert
和ca
参数:This is the code we use at the top of our canary function running
syn-nodejs-puppeteer-3.5
to retrieve and use a certificate, private key, and CA from AWS secrets manager:Then, just inside the
apiCanaryBlueprint
function, load the key/cert/CAand then later, when setting
requestOptions
, specify thekey
,cert
, andca
parameters: