【问题标题】:Is this behavior with the referrer when sending a XMLHttpRequest in Brave intended?在 Brave 中发送 XMLHttpRequest 时,引用者是否有这种行为?
【发布时间】:2017-01-05 15:26:43
【问题描述】:
var xhr = new XMLHttpRequest();

xhr.open('GET', 'https://httpbin.org', true);
xhr.send();

当从example.org 运行上面的这个简单代码时,Chrome devtools 中的请求标头会显示:

Host:httpbin.org
Origin:http://example.org
Referer:http://example.org

在 Brave 中运行相同的代码时,我得到了这个:

Host:httpbin.org
Origin:https://example.org
Referer:https://httpbin.org

我觉得引用者与主机相同是一个错误,但也许我错过了一些东西。我应该举报吗?

【问题讨论】:

    标签: browser xmlhttprequest referrer


    【解决方案1】:

    这种行为是有意的。

    当“第 3 方 cookie 块”开启时,我们会欺骗跨域引用。

    Source

    【讨论】:

    • 如果这个功能可以单独禁用就好了。在 Brave 上使用我们网站的唯一方法(通过推荐人使用社交注册)是打开“所有 Cookie”,这似乎有点过头了。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-08-07
    • 1970-01-01
    • 2011-10-26
    • 2021-10-03
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多