
Research
2025 Report: Destructive Malware in Open Source Packages
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.
forwarded-http
Advanced tools
Resolves RFC 7239 / Forwarded HTTP Extension, with fallback to all legacy & special Forward headers: `X-Forwarded-*`, `X-Real-*` and others
Resolves RFC 7239 (Forwarded HTTP Extension), with fallback to all legacy & special Forward headers:
X-Forwarded-*,X-Real-*,Fastly-Client-IP,X-Cluster-Client-IP, and others.
Focuses on resolving to the RFC standard and providing a consistent access to HTTP Forwarded Parameters: by, for, host, proto.
Filter valid IPv4 or IPv6 IPs against glob pattern, array, string, regexp or matcher function.
Use as Express Middleware to populate req.forwarded object.
npm install --save forwarded-http
var forwarded = require('forwarded-http')
var params = forwarded(req)
// filter IP ranges
var filteredParams = forwarded(req, {
filter: ['1.0.?.*', '2001:db8:*']
})
// don't list private IPs
var filteredParams = forwarded(req, {
allowPrivate: false
})
.portThe final proxied port before hitting this server
var params = forwarded(req)
params.port // '8000'
.forOject with IPs as key with matching port used as value (if applicable)
var params = forwarded(req)
params.for // { '0.0.0.1': '8000', '0.0.0.2': '8001' }
.protoThe final proxied protocol before hitting this server
var params = forwarded(req)
params.proto // 'https'
.hostThe proxied host
var params = forwarded(req)
arams.host // 'foo.com'
.portsArray of ports the client is connected through
var params = forwarded(req)
params.ports // ['8000', '8001']
.ipsArray of IP addresses the client is connected through
var params = forwarded(req)
params.ips // ['0.0.0.1', '0.0.0.2']
Use as Express Middleware to populate req.forwarded object.
var express = require('express')
var forwarded = require('forwarded-http/lib/middleware')
var app = express()
// use with default options
app.use(forwarded())
// or with options
app.use(forwarded(req, {
filter: ['1.0.?.*', '2001:db8:*'],
allowPrivate: false
})
Donations are welcome to help support the continuous development of this project.
FAQs
Resolves RFC 7239 / Forwarded HTTP Extension, with fallback to all legacy & special Forward headers: `X-Forwarded-*`, `X-Real-*` and others
We found that forwarded-http demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.

Security News
Socket CTO Ahmad Nassri shares practical AI coding techniques, tools, and team workflows, plus what still feels noisy and why shipping remains human-led.

Research
/Security News
A five-month operation turned 27 npm packages into durable hosting for browser-run lures that mimic document-sharing portals and Microsoft sign-in, targeting 25 organizations across manufacturing, industrial automation, plastics, and healthcare for credential theft.