---
title: cors
---

# cors

<a href="https://github.com/remix-run/remix/blob/remix@3.0.0-alpha.6/packages/cors-middleware/src/lib/cors.ts#L128" target="_blank">View Source</a>

## Summary

Middleware that adds CORS headers and handles CORS preflight requests.

## Signature

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

```

## Params

### options

CORS options

## Returns

CORS middleware