23 lines
583 B
JavaScript
23 lines
583 B
JavaScript
// src/mocks/handlers/bytedesk.js
|
|
/**
|
|
* Bytedesk 客服 Widget MSW Handler
|
|
* 使用 passthrough 让请求通过到真实服务器,消除 MSW 警告
|
|
*/
|
|
|
|
import { http, passthrough } from 'msw';
|
|
|
|
export const bytedeskHandlers = [
|
|
// Bytedesk API 请求 - 直接 passthrough
|
|
// 匹配 /bytedesk/* 路径(通过代理访问后端)
|
|
http.all('/bytedesk/*', () => {
|
|
return passthrough();
|
|
}),
|
|
|
|
// Bytedesk 外部 CDN/服务请求
|
|
http.all('https://www.weiyuai.cn/*', () => {
|
|
return passthrough();
|
|
}),
|
|
];
|
|
|
|
export default bytedeskHandlers;
|