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

x/alosaur/src/middlewares/mod.ts>CorsBuilder

Alosaur - Deno web framework with many decorators
Very Popular
Go to Latest
class CorsBuilder
implements MiddlewareTarget<T>
import { CorsBuilder } from "https://deno.land/x/alosaur@v0.16.2/src/middlewares/mod.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)