# @adonisjs/cors

> CORS middleware for AdonisJS HTTP server

Latest version **3.0.0** (published 2026-02-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install @adonisjs/cors
pnpm add @adonisjs/cors
yarn add @adonisjs/cors
bun add @adonisjs/cors
```

## Health

**Score 70/100 (B)** — status: stable.

Positive: has types; esm support; no vulnerabilities; has provenance; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 3.0.0 |
| Published | 2026-02-25 |
| First published | 2017-08-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=18.16.0 |
| Dependencies | 0 |
| Unpacked size | 19.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 6 |
| Author | Harminder Virk |
| Maintainers | romainlanz, virk, julien-r44 |
| Keywords | adonisjs, cors-middleware, cors, adonisjs-core |

## Links

- npm: https://www.npmjs.com/package/@adonisjs/cors
- Repository: https://github.com/adonisjs/cors
- Homepage: https://github.com/adonisjs/cors#readme
- Issues: https://github.com/adonisjs/cors/issues
- npm.io page: https://npm.io/package/@adonisjs/cors

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 3.0.0 (latest) — 2026-02-25
- 3.0.0-next.0 (next) — 2025-09-10
- 1.0.7 (legacy) — 2018-09-27
- 2.2.1 — 2024-01-09
- 2.2.0 — 2024-01-08
- 2.1.1 — 2023-12-24
- 2.1.0 — 2023-11-27
- 2.1.0-4 — 2023-10-18
- 2.1.0-3 — 2023-08-23
- 2.1.0-2 — 2023-08-22
- 2.1.0-1 — 2023-07-26
- 2.1.0-0 — 2023-02-20
- 2.0.0-0 — 2023-01-19
- 1.0.6 — 2018-06-02
- 1.0.5 — 2018-02-08
- … 5 more at https://npm.io/package/@adonisjs/cors/versions

## README

# @adonisjs/cors

<br />

[![gh-workflow-image]][gh-workflow-url] [![npm-image]][npm-url] ![][typescript-image] [![license-image]][license-url]

## Introduction

CORS middleware to manage CORS policies inside an AdonisJS project.

## Official Documentation

The documentation is available on the [AdonisJS website](https://docs.adonisjs.com/guides/cors)

## Contributing

One of the primary goals of AdonisJS is to have a vibrant community of users and contributors who believes in the principles of the framework.

We encourage you to read the [contribution guide](https://github.com/adonisjs/.github/blob/main/docs/CONTRIBUTING.md) before contributing to the framework.

## Code of Conduct

In order to ensure that the AdonisJS community is welcoming to all, please review and abide by the [Code of Conduct](https://github.com/adonisjs/.github/blob/main/docs/CODE_OF_CONDUCT.md).

## License

AdonisJS CORS middleware is open-sourced software licensed under the [MIT license](LICENSE.md).

[gh-workflow-image]: https://img.shields.io/github/actions/workflow/status/adonisjs/cors/checks.yml?style=for-the-badge
[gh-workflow-url]: https://github.com/adonisjs/cors/actions/workflows/checks.yml 'Github action'
[npm-image]: https://img.shields.io/npm/v/@adonisjs/cors/latest.svg?style=for-the-badge&logo=npm
[npm-url]: https://www.npmjs.com/package/@adonisjs/cors/v/latest 'npm'
[typescript-image]: https://img.shields.io/badge/Typescript-294E80.svg?style=for-the-badge&logo=typescript
[license-url]: LICENSE.md
[license-image]: https://img.shields.io/github/license/adonisjs/cors?style=for-the-badge

---
_Source: https://npm.io/package/@adonisjs/cors · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
