Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

Usage

import * as middleware from "https://raw.githubusercontent.com/worker-tools/middleware/master/cors.ts";

§Variables

ALLOW_CREDENTIALS
ALLOW_HEADERS
ALLOW_METHODS
ALLOW_ORIGIN
anyCORS

A CORS middleware that gives clients exactly the permissions they ask for, unless constrained by the definitions in options.

cors

A CORS middleware that gives clients exactly the permissions they ask for, unless constrained by the definitions in options.

ORIGIN
REQUEST_HEADERS
REQUEST_METHOD
strictCORS

A CORS middleware that only grants the permissions defined via options.

VARY

§Interfaces

CORSOptions

§Type Aliases

Method
StrictCORSOptions