fix: api watch data
This commit is contained in:
@@ -11,6 +11,18 @@ export default function createProxyTable(target?: string) {
|
||||
secure: false,
|
||||
ws: true,
|
||||
pathRewrite: (pth: string) => pth.replace(`/^/${api}/`, `/${api}`),
|
||||
// onProxyRes: (proxyRes: any, req: any, res: any) => {
|
||||
// if (req.headers.accept === 'text/event-stream') {
|
||||
// res.writeHead(res.statusCode, {
|
||||
// 'Content-Type': 'text/event-stream',
|
||||
// 'Cache-Control': 'no-transform',
|
||||
// Connection: 'keep-alive',
|
||||
// 'X-Accel-Buffering': 'no',
|
||||
// 'Access-Control-Allow-Origin': '*'
|
||||
// });
|
||||
// proxyRes.pipe(res);
|
||||
// }
|
||||
// },
|
||||
headers: {
|
||||
origin: newTarget,
|
||||
Connection: 'keep-alive'
|
||||
|
||||
Reference in New Issue
Block a user