# secure-cors

> ## Installation `npm i -S secure-cors`

Latest version **1.2.0** (published 2018-03-26) · ISC license · 0 weekly downloads

## Install

```sh
npm install secure-cors
pnpm add secure-cors
yarn add secure-cors
bun add secure-cors
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.0 |
| Published | 2018-03-26 |
| First published | 2018-03-26 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 10.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | lfaler |

## Links

- npm: https://www.npmjs.com/package/secure-cors
- npm.io page: https://npm.io/package/secure-cors

## Dependencies (2)

- [vary](https://npm.io/package/vary.md) ^1.1.2
- [object-assign](https://npm.io/package/object-assign.md) ^4.1.1

## Recent versions

- 1.2.0 (latest) — 2018-03-26
- 1.1.0 — 2018-03-26
- 1.0.9 — 2018-03-26
- 1.0.8 — 2018-03-26
- 1.0.7 — 2018-03-26
- 1.0.6 — 2018-03-26
- 1.0.5 — 2018-03-26
- 1.0.4 — 2018-03-26
- 1.0.3 — 2018-03-26
- 1.0.2 — 2018-03-26
- 1.0.1 — 2018-03-26
- 1.0.0 — 2018-03-26

## README

# Secure CORS

## Installation
`npm i -S secure-cors`

## Why Secure CORS
    /*
    Use secure CORS because it gives errors when you use wild cards for origins.
    Allowing any wild cards in your CORS allows you to use your server with any domain under that wildcard.
    Be sure to specify the exact urls you need.
    */

    const express = require('express');
    const cors = require('secure-cors');

    const app = express();

    app.use(cors({
        origin: 'https://www.example.com' // never '*' or '*.example.com'
    }));

    app.listen(3000);

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