Commit e0d75f1
committed
fix(feed): sanitizeMediaUrl 自动把 http:// 升级到 https://
后端 OgFetchService 已在抓取阶段把 og:image 升到 https,这里是 defense-in-depth:
- 历史数据未回填的 http:// 封面仍能在 feed 卡片显示
- LLM 兜底回填或未来新 site adapter 漏 https 升级时前端兜一层
- HTTPS 页面加载 http:// 图片会被 mixed-content policy 拦掉显示成裂图,
线上 /feed 上小红书两条卡片就是这个症状
不动相对路径("/x.jpg")和已是 https 的 URL;非 http(s) 协议在 sanitize 阶段
就被白名单拒了,走不到升级分支。1 parent 9ee4e82 commit e0d75f1
1 file changed
Lines changed: 12 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
52 | 57 | | |
53 | 58 | | |
54 | 59 | | |
55 | 60 | | |
56 | | - | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
57 | 68 | | |
0 commit comments