简体   繁体   English

Electron 获取 httponly cookie

[英]Electron get httponly cookies

Is there a way to somehow get the values of httpOnly cookies in electron?有没有办法以某种方式获取电子中 httpOnly cookie 的值?

The site I'm pre-loading before my main app loads, sends an httpOnly cookie that has a key inside.我在主应用程序加载之前预加载的站点发送一个 httpOnly cookie,里面有一个密钥。 I need this key for my http request headers.我的 http 请求标头需要此密钥。

I tried with webContents.session.cookies without luck.我尝试使用webContents.session.cookies没有运气。

I was able to to get an httpOnly cookie using Nightmare.js, which uses Electron.我能够使用使用 Electron 的 Nightmare.js 获取httpOnly cookie。 Therefore, I think you should be able to achieve that by looking at the source.因此,我认为您应该能够通过查看源代码来实现这一点。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM