Skip to content
On this page

Cross-origin resource sharing (CORS) is a mechanism that allows resources to be requested from another domain. Under the hood, Danet makes use of this cors package for Deno. This package provides various options that you can customize based on your requirements.

Getting started

To enable CORS, call the enableCors() method on the Danet application object.

const app = new DanetApplication();

The enableCors() method takes an optional configuration object argument. The available properties of this object are described in the official CORS package documentation.