Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/alosaur/src/middlewares/cors-builder.ts>CorsBuilder

Alosaur - Deno web framework with many decorators
Go to Latest
class CorsBuilder
implements MiddlewareTarget<T>
import { CorsBuilder } from "https://deno.land/x/alosaur@v0.25.0/src/middlewares/cors-builder.ts";

Constructors

new
CorsBuilder()

Properties

private
allowAnyHeader: boolean
private
allowAnyMethod: boolean
private
allowAnyOrigin: boolean
private
headers: Map<string, string>

Methods

onPostRequest(context: Context<T>): Promise<void>
onPreRequest(context: Context<T>): Promise<void>
WithHeaders(headers: string)
WithMethods(methods: string)
WithOrigins(origins: string)