safe-passage

1.0.2 • Public • Published

Safe Passage

Express security middleware used by 울집마켓 and Kithub.

Safe Passage NPM Safe Passage Github
Go NPM Go Github

Usage

import express from 'express';
import SafePassage from 'safe-passage';

const app = express();

app.use(SafePassage({
    header: true,
    error: true,
    valid: true,
    caching: true,
    limit: {
        windowMs: 15 * 60 * 1000,
        max: 1000
    },
    session_key: `testkey`,
    compress: true
}));

app.get(`/`, (req, res) => {
    res.setHeader(`Content-type`, `application/json`);
    res.send(JSON.stringify({}));
});

app.listen(8080, () => {
    console.log(`localhost:8080`);
});

Package Sidebar

Install

npm i safe-passage

Weekly Downloads

1

Version

1.0.2

License

MIT

Unpacked Size

4.82 kB

Total Files

5

Last publish

Collaborators

  • ice1