UNPKG

node-web-mvc

Version:
17 lines (16 loc) 669 B
import CorsConfiguration from './CorsConfiguration'; export default class CorsRegistration { private readonly pathPattern; private readonly config; constructor(pathPattern: string); allowedOrigins(...origins: string[]): this; allowedMethods(...methods: string[]): this; allowedHeaders(...headers: string[]): this; exposedHeaders(...headers: string[]): this; allowCredentials(allowCredentials: boolean): this; allowOriginPatterns(...patterns: RegExp[]): this; allowPrivateNetwork(allowPrivateNetwork: boolean): this; maxAge(maxAge: number): this; getPathPattern(): string; getCorsConfiguration(): CorsConfiguration; }