no message

This commit is contained in:
2026-06-16 16:27:02 +08:00
parent 6e0a1fbcbb
commit 33070ad827
2436 changed files with 183 additions and 1746 deletions

View File

@@ -96,6 +96,28 @@ const base = {
headers: {
'Access-Control-Allow-Origin': '*'
},
proxy: (() => {
const remote = process.env.UNITY_CDN_REMOTE || 'https://oss.eanic.cn/001_code_cocos_res_20260616';
const proxyPrefix = process.env.UNITY_CDN_DEV_PROXY || '/cdn-unity';
let origin;
let pathname;
try {
const u = new URL(remote);
origin = u.origin;
pathname = u.pathname.replace(/\/$/, '');
} catch (e) {
return {};
}
return {
[proxyPrefix]: {
target: origin,
pathRewrite: {[proxyPrefix]: pathname},
changeOrigin: true,
secure: true,
logLevel: 'warn'
}
};
})(),
// 自定义请求头
before: function (app, server) {
@@ -412,7 +434,10 @@ module.exports = [
patterns: [
{
from: 'static',
to: ''
to: '',
globOptions: {
ignore: process.env.UNITY_CDN_PURE ? ['**/unity/**'] : []
}
}
]
}),