Commit 1cdac94
committed
fix(hotdocs): SSR fetch 加 InvolutionHell-SSR UA 让 CF 放行
故障
首页右侧 "Hot This Week / 本周最热" 一直显示 "暂无数据"。
直接 curl 后端 /analytics/top-docs 是 200 + 5 条数据正常。
根因
其他 SSR fetcher(fetchProfile / events / feed)都带
"InvolutionHell-SSR/1.0 (+https://involutionhell.com)" UA,匹配 CF Custom
Rule 跳过 Bot Fight。HotDocsPreview 之前没加 header,Vercel runner 默认
"node" UA 不匹配规则,按 IP 信誉被拦回 403/empty → catch 返 [] → "暂无数据"。
本 PR
跟其他 SSR fetcher 完全对齐,加 accept + user-agent header。1 parent 6ce8104 commit 1cdac94
1 file changed
Lines changed: 11 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
24 | 34 | | |
25 | 35 | | |
26 | 36 | | |
| |||
0 commit comments