mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-10 14:44:05 -08:00
7e1a13f9b2
sse-channel 4 removed CORS support, that's why we need to handle CORS for `/push` ourselves now.
18 lines
377 B
TypeScript
18 lines
377 B
TypeScript
import type { Request, Response } from 'express';
|
|
|
|
declare module 'sse-channel' {
|
|
declare class Channel {
|
|
constructor();
|
|
|
|
on(event: string, handler: (channel: string, res: Response) => void): void;
|
|
|
|
removeClient: (res: Response) => void;
|
|
|
|
addClient: (req: Request, res: Response) => void;
|
|
|
|
send: (msg: string, clients?: Response[]) => void;
|
|
}
|
|
|
|
export = Channel;
|
|
}
|