我在 Ionic 应用程序的控制台中收到此错误:
[Deprecation] Subresource requests whose URLs contain embedded credentials (e.g. `https://user:pass@host/`) are deprecated, and will be blocked in M59, around June 2017.
该行代码是 ajax 请求的 URL:
function dbUrl() {
return unescape(encodeURIComponent("http://idname:[email protected] /cdn-cgi/l/email-protection/pDB.json"));
}
我怎样才能解决这个问题?
五参数版本XMLHttpRequest.open
方法允许您指定用户名和密码。
xhr.open(method, url, async, username, password)
这是文档 https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/open和spec https://xhr.spec.whatwg.org/#the-open()-method.
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)