added all new chanes

This commit is contained in:
ahmadrezabd
2026-01-05 14:59:18 +03:30
parent 33d26f5af9
commit aa9236fb92
16 changed files with 1289 additions and 79 deletions
+23
View File
@@ -48,6 +48,29 @@ export default defineConfig({
alias: {
'@': path.resolve(__dirname, './src')
}
},
server: {
proxy: {
'/api/n8n': {
target: 'https://nn.feep.ir',
changeOrigin: true,
rewrite: (path) => {
// تبدیل /api/n8n/webhook/... به /webhook/...
const rewritten = path.replace(/^\/api\/n8n/, '');
console.log(`[Proxy] Rewriting: ${path} -> ${rewritten}`);
return rewritten;
},
secure: true,
configure: (proxy, _options) => {
proxy.on('error', (err, _req, res) => {
console.log('[Proxy] Error:', err);
});
proxy.on('proxyReq', (proxyReq, req, _res) => {
console.log('[Proxy] Request:', req.method, req.url, '->', proxyReq.path);
});
}
}
}
}
});