safe-passage
v1.0.2
Published
A safe passage
Downloads
4
Readme
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`);
});