express-limit-host
v0.0.5
Published
![node-test](https://github.com/Soontao/express-limit-host/workflows/node-test/badge.svg) [![codecov](https://codecov.io/gh/Soontao/express-limit-host/branch/main/graph/badge.svg?token=gTDJNGSGcQ)](https://codecov.io/gh/Soontao/express-limit-host) ![GitHu
Downloads
7
Readme
express limit host
simple middleware to protect server from host
/x-forwarded-host
injection.
Usage
just install & use it as an express middleware
const createHostLimit = require("express-limit-host")
const express = require("express")
const app = express()
app.use(createHostLimit({
loopback: true,
allowList: [
'proxy-server-host.com',
'direct-service-host.com'
],
rejectStatusCode: 403
}))
// add your router/handler