index.d.ts 381 B

123456789101112131415
  1. import { Context } from 'egg';
  2. declare module 'egg' {
  3. export interface EggAppConfig {
  4. cors: {
  5. origin: string | ((ctx: Context) => string);
  6. allowMethods: string | string[];
  7. exposeHeaders?: string | string[];
  8. allowHeaders?: string | string[];
  9. maxAge?: string | number;
  10. credentials?: boolean;
  11. keepHeadersOnError?: boolean;
  12. }
  13. }
  14. }