deno.land / x / abc@v1.3.3 / docs / cors.md
CORS
is a mechanism that allows resources to be requested from another domain,
which enable secure cross-domain data transfers.
const config: CORSConfig = {
allowOrigins: ["https://a.com", "https://b.com", "https://c.com"],
allowMethods: [HttpMethod.Get],
};
const app = new Application();
app.use(cors(config));
export const DefaultCORSConfig: CORSConfig = {
skipper: DefaultSkipper,
allowOrigins: ["*"],
allowMethods: [
HttpMethod.Delete,
HttpMethod.Get,
HttpMethod.Head,
HttpMethod.Patch,
HttpMethod.Post,
HttpMethod.Put,
],
};
Version Info