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

x/alosaur/mod.ts>CorsBuilder

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