---
title: "cors"
source: "https://github.com/remix-run/remix/blob/main/packages/cors-middleware/src/lib/cors.ts#L131"
---

# 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