UNPKG

@glandjs/http

Version:

A protocol adapter for HTTP built on top of the Gland architecture solution.

7 lines (6 loc) 442 B
import { Maybe } from '@medishn/toolkit'; import type { CorsOptions, CorsOptionsDelegate } from '../interface'; import type { IncomingMessage } from 'http'; export type StaticOrigin = boolean | string | RegExp | (string | RegExp)[]; export type CustomOrigin = (requestOrigin: string, callback: (err: Maybe<Error>, origin?: StaticOrigin) => void) => void; export type CorsConfig = boolean | CorsOptions | CorsOptionsDelegate<IncomingMessage>;