Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pac
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ai-tools
pac
Commits
db03f5cd
Commit
db03f5cd
authored
Oct 14, 2026
by
luoqi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(web): send origin referrer when loading Baidu analytics
parent
89ba8c29
Pipeline
#3793
failed in 0 seconds
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
apps/ai-web/src/components/baidu-analytics.tsx
+2
-1
apps/pac-web/src/components/baidu-analytics.tsx
+2
-1
No files found.
apps/ai-web/src/components/baidu-analytics.tsx
View file @
db03f5cd
...
...
@@ -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
...
...
apps/pac-web/src/components/baidu-analytics.tsx
View file @
db03f5cd
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment