---
title: cors
source: https://github.com/remix-run/remix/blob/remix@3.0.0-beta.3/packages/cors-middleware/src/lib/cors.ts#L128
---

# cors

## Summary

Middleware that adds CORS headers and handles CORS preflight requests.

## Signature

```ts
function cors(options: CorsOptions): Middleware;

```

## Parameters

### `options`

CORS options

## Returns

CORS middleware