gpt4 book ai didi

http - 从 Report-To 标题获取弃用报告;正在生成报告但未发送

转载 作者:行者123 更新时间:2023-12-03 15:51:26 26 4
gpt4 key购买 nike

无法让 Chrome/任何浏览器发送使用 Report-To header 生成的报告

嗨,我正在尝试收集 Deprecation/Crash/Intervention浏览器访问触发事件的网页生成的报告。我有一个端点设置,当浏览器访问页面时,它当前接收 CSP 报告,但即使控制台和日志查看器中存在弃用错误,也生成了弃用报告,它不是由 chrome(或Safari 或 Firefox)。
Report-To正在发送 header 以及 NEL header (它也无法发送报告但不是我的重点),通过使用 securityheaders.com 扫描我的页面可以看出:

enter image description here

(测试的最大年龄在这里很短,但我已经尝试了整整一年)

日志

使用 chrome://net-export/并访问带有已弃用 JS 的页面,我可以看到在“Per origin config”部分中设置了正确的信息:

correct per origin config

并且已弃用的 JS 正在生成弃用报告:

deprecation reports

但由于某种原因,报告从未发送。有时,在日志转储中,它说已经多次尝试发送报告。

测试

我曾尝试将 chrome 与命令行标志一起使用 --enable-features=Reporting--enable-blink-features=Reporting (尽管我认为无论如何都启用了三种报告类型; InterventionDeprecationCrash )。我还使用了 safari 和 firefox,并在控制台中收到了弃用警报,但发送的唯一报告是 CSP 报告。

最佳答案

The Reporting API was designed to be out of band from your web app. The browser captures, queues and batches, then sends reports automatically at the most opportune time. Reports are sent internally by the browser, so there's little to no performance concern (e.g. network contention with your app) when using the Reporting API. There's also no way to control when the browser sends queued reports.



根据文档,这似乎无法克服。

https://developers.google.com/web/updates/2018/09/reportingapi#sending

关于http - 从 Report-To 标题获取弃用报告;正在生成报告但未发送,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62302176/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com