1.0.2 • Published 10 months ago

safe-passage v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

Safe Passage

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

Safe Passage NPMSafe Passage Github
Go NPMGo 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`);
});