Commit db03f5cd by luoqi

fix(web): send origin referrer when loading Baidu analytics

parent 89ba8c29
Pipeline #3793 failed in 0 seconds
......@@ -24,7 +24,8 @@ export function BaiduAnalytics() {
script.id = 'baidu-analytics';
script.async = true;
script.src = `https://hm.baidu.com/hm.js?${SITE_ID}`;
script.referrerPolicy = 'no-referrer';
// 百度按来源域名返回站点脚本,只发送 origin,避免暴露路径和参数。
script.referrerPolicy = 'origin';
document.head.appendChild(script);
}
const page = pathname
......
......@@ -24,7 +24,8 @@ export function BaiduAnalytics() {
script.id = 'baidu-analytics';
script.async = true;
script.src = `https://hm.baidu.com/hm.js?${SITE_ID}`;
script.referrerPolicy = 'no-referrer';
// 百度按来源域名返回站点脚本,只发送 origin,避免暴露路径和参数。
script.referrerPolicy = 'origin';
document.head.appendChild(script);
}
const page = pathname
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment