feat(图片缓存功能): 将生产环境的连接头也识别为oss图片进行缓存

This commit is contained in:
hzj 2025-12-22 16:19:53 +08:00
parent 5a064efb1f
commit 2af2a0ec4f

View File

@ -209,9 +209,12 @@ class ImageCacheManager {
return true
}
// 新增:允许缓存特定域名下的资源
// 允许缓存特定域名下的资源
const ossBaseUrl = 'https://tkm-likei.oss-ap-southeast-1.aliyuncs.com/h5'
if (url.startsWith(ossBaseUrl)) {
// 允许缓存开发环境下的代理路径
const devProxyPath = '/oss/h5/'
if (url.startsWith(ossBaseUrl) || url.startsWith(devProxyPath)) {
return true
}