class CORSMiddleware
extends Middleware
import { CORSMiddleware } from "https://dotland.deno.dev/x/drash@v3.0.0-beta.2/src/modules/middleware/CORS/mod.ts";
Methods
protected
appendHeaderValue(header: { key: string; value: string; }, headers: Headers): voidprotected
getAllowOriginHeaderValue(request: Request): string | nullprotected
getCorsResponseHeaders(request: Request): HeadersAll CORS-related response headers start out with the values defined in this method.
protected
setHeaderAllowCredentials(headers: Headers): voidprotected
setHeaderAllowHeaders(req: Request, headers: Headers): voidprotected
setHeaderAllowMethods(headers: Headers)protected
setHeaderAllowOrigin(request: Request, headers: Headers): voidprotected
setHeaderExposeHeaders(headers: Headers): voidprotected
setHeaderMaxAge(headers: Headers)protected
setPreflightHeaders(request: Request, headers: Headers): voidALL(request: Request): Promise<Response>
OPTIONS(request: Request): Response