首页
注册
登录
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请
登录
V2EX
›
Electron
萌新求教, Electron 在请求跨域的接口时,怎么获取 cookie?
mietl
·
mietl
·
3 天前
· 218 次点击
接口地址
http://bgm.tv/login
使用 axios 请求 withCredentials 有设置 true
1. 尝试在 cookie 中添加 Secure; SameSite=None 但是 Secure 只在 https 协议上生效
2. 关闭 webPreferences webSecurity 安全性也不行
请问还有其他办法吗?
3 条回复
1
mietl
OP
3 天前
https://imgur.com/DfY3JgH
2
LuckyLauncher
3 天前
都 electron 了,就把跨域关了呗
3
mietl
OP
3 天前
跨域关了没有用、响应头里能看到 cookie 、 但是 axios 或 fetch 中响应头不会包含
关于
·
帮助文档
·
博客
·
API
·
FAQ
·
实用小工具
·
5157 人在线
最高记录 6679
·
Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 21ms ·
UTC 09:33
·
PVG 17:33
·
LAX 02:33
·
JFK 05:33
Developed with
CodeLauncher
♥ Do have faith in what you're doing.