iOS wx.connectSocket 自带Auth Header

发布于 7 年前作者 nasong15431 次浏览最后编辑 7 年前来自 ask

调用wx.connectSocket的时候,在没有设置header的情况下,iPhone(6s)手机会自己设置header,其中设置了Authorization: Basic xxxxx的header,导致后台登录错误。临时修复方法:调用wx.connectSocket时,自己调用"Authorization": “”,如:

wx.connectSocket({

    url: ‘xxx’,

    header: {“Authorization”: “”}

})

这个问题只有在iPhone手机看到了

1 回复
mintan
mintan1 楼5 年前

@官方