Dwex Logo

CORS

Configure Cross-Origin Resource Sharing

CORS

Learn how to configure CORS in your Dwex applications.

This page is under construction. Documentation coming soon!

Overview

Configure Cross-Origin Resource Sharing to allow your API to be accessed from different domains.

Example

const app = await DwexFactory.create(AppModule, {
	cors: {
		origin: "https://example.com",
		credentials: true,
	},
});

Topics Covered

  • CORS configuration
  • Allowed origins
  • Credentials
  • Headers and methods
  • Preflight requests