fix: 移除首访强制跳转/ipv6 与图片代理拼接修复 (fixed105)
Docker Build & Test / build (push) Canceled after 0s
Docker Build & Test / test (push) Canceled after 0s
Build & Push Docker image / build-and-push (linux/amd64) (push) Canceled after 0s
Build & Push Docker image / build-and-push (linux/arm/v7) (push) Canceled after 0s
Build & Push Docker image / build-and-push (linux/arm64) (push) Canceled after 0s
Build & Push Docker image / merge-images (push) Canceled after 0s
Release / release (push) Canceled after 0s
Release / docker (push) Canceled after 0s

- 删除 Ipv6FirstVisitGate 首访强制跳转(layout.tsx 不再挂载),首页直接加载数据
- 开启 NEXT_PUBLIC_IMAGE_PROXY=/api/image-proxy,海报走站内代理
- 修复 processImageUrl 缺少 ?url= 分隔符导致的非法图片 URL
- 实测: 30/30 海报加载成功, 无跳转, IPv6 推荐浮层正常显示
This commit is contained in:
jinghui committed 2026-11-10 02:14:18 +08:00
1 parent 2c8a68b064
commit d5443d97c9
7 files changed
+190 -52

No files matched your search

+4 -1
View File
@@ -37,7 +37,10 @@ export function processImageUrl(originalUrl: string): string {
const proxyUrl = getImageProxyUrl();
if (!proxyUrl) return originalUrl;
return `${proxyUrl}${encodeURIComponent(originalUrl)}`;
// 代理地址若未自带查询参数(如 /api/image-proxy),补 ?url=,否则拼出的 URL 非法
if (proxyUrl.includes('url=')) return `${proxyUrl}${encodeURIComponent(originalUrl)}`;
const sep = proxyUrl.includes('?') ? '&' : '?url=';
return `${proxyUrl}${sep}${encodeURIComponent(originalUrl)}`;
}
/**