This commit is contained in:
yangsy
2025-08-15 10:40:51 +08:00
parent fb99501e2e
commit 3230536899

View File

@@ -25,6 +25,7 @@ export default defineConfig((/* { command, mode } */) => {
target, target,
changeOrigin: true, changeOrigin: true,
rewrite: (path) => { rewrite: (path) => {
console.log(new Date().toLocaleString());
console.log(`请求路径: ${path}`); console.log(`请求路径: ${path}`);
const rewrittenPath = path.replace(new RegExp(`^${prefix}`), ''); const rewrittenPath = path.replace(new RegExp(`^${prefix}`), '');
console.log(`将代理到: ${target}${rewrittenPath}`); console.log(`将代理到: ${target}${rewrittenPath}`);