From 1b7bec47ee68cf8d4161c83442b485f42c48f0fa Mon Sep 17 00:00:00 2001 From: zdl <3489966805@qq.com> Date: Tue, 11 Nov 2025 19:00:02 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=B0=83=E6=95=B4api?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- craco.config.js | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/craco.config.js b/craco.config.js index 11aa6312..9006f93e 100644 --- a/craco.config.js +++ b/craco.config.js @@ -264,11 +264,26 @@ module.exports = { pathRewrite: { '^/concept-api': '' }, }, '/bytedesk-api': { - target: 'http://43.143.189.195', + target: 'https://valuefrontier.cn', // 统一使用生产环境 Nginx 代理 changeOrigin: true, - secure: false, + secure: false, // 开发环境禁用 HTTPS 严格验证 logLevel: 'debug', - pathRewrite: { '^/bytedesk-api': '' }, + ws: true, // 支持 WebSocket + // 不使用 pathRewrite,保留 /bytedesk-api 前缀,让生产 Nginx 处理 + }, + '/chat': { + target: 'https://valuefrontier.cn/bytedesk-api', // Bytedesk iframe 内部的资源(SDK、CSS等) + changeOrigin: true, + secure: false, // 开发环境禁用 HTTPS 严格验证 + logLevel: 'debug', + // 保留 /chat 路径 + }, + '/config': { + target: 'https://valuefrontier.cn/bytedesk-api', // Bytedesk 配置接口 + changeOrigin: true, + secure: false, // 开发环境禁用 HTTPS 严格验证 + logLevel: 'debug', + // 保留 /config 路径 }, }, }),