s3.1080p.hk 已永久停用且文件不可恢复。首页查询排除旧源并统一分页统计,历史图册、聊天和画布保留记录并显示失效说明;下载和代理返回 410,停止旧源上传与归档。使用本地黑白 Logo 适配主题。 提供保存原配置后停用旧存储、取消失效精选、替换 Logo 的整理脚本。七牛 10 月 14 日上传核查记录见 docs/retired-storage.md。 验证:7 项旧存储检查、41 项下载和归档回归测试、TypeScript 检查通过。
17 lines
835 B
TypeScript
17 lines
835 B
TypeScript
/** Permanently decommissioned storage. Historical records remain for reference. */
|
|
export const RETIRED_STORAGE_URL_PATTERN = '^https?://s3[.]1080p[.]hk([/:?#]|$)';
|
|
export const RETIRED_STORAGE_MESSAGE = '旧存储已停用,源文件已无法恢复,请重新上传。';
|
|
|
|
export function isRetiredStorageUrl(value: string | null | undefined): boolean {
|
|
if (!value) return false;
|
|
try {
|
|
const url = new URL(value, 'https://local.invalid');
|
|
if (url.hostname === 's3.1080p.hk') return true;
|
|
if (url.pathname === '/api/image-proxy' || url.pathname === '/api/canvas/3d/model-proxy') {
|
|
const source = url.searchParams.get('url');
|
|
return Boolean(source && new URL(source).hostname === 's3.1080p.hk');
|
|
}
|
|
} catch { /* Relative local assets and non-URL values are not retired storage. */ }
|
|
return false;
|
|
}
|