index.d.ts 393 B

123456789101112131415
  1. import * as Koa from 'koa';
  2. declare function KoaProxies(path: string, options: KoaProxies.IKoaProxiesOptions): Koa.Middleware;
  3. declare namespace KoaProxies {
  4. interface IKoaProxiesOptions {
  5. target: string;
  6. changeOrigin?: boolean;
  7. logs?: boolean | ((ctx: Koa.Context, target: string) => void);
  8. agent?: any;
  9. rewrite?: (path: string) => string;
  10. }
  11. }
  12. export = KoaProxies;