Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@tinyhttp/forwarded

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tinyhttp/forwarded - npm Package Compare versions

Comparing version 0.5.2 to 0.5.4

12

CHANGELOG.md
# @tinyhttp/forwarded
## 0.5.4
### Patch Changes
- make types more flexible
## 0.5.3
### Patch Changes
- Make types more flexible
## 0.5.2

@@ -4,0 +16,0 @@

2

dist/index.d.ts

@@ -6,3 +6,3 @@ /// <reference types="node" />

*/
export declare function forwarded(req: IncomingMessage): string[];
export declare function forwarded(req: Pick<IncomingMessage, 'headers' | 'connection'>): string[];
/**

@@ -9,0 +9,0 @@ * Parse the X-Forwarded-For header.

{
"name": "@tinyhttp/forwarded",
"version": "0.5.2",
"version": "0.5.4",
"type": "module",

@@ -5,0 +5,0 @@ "description": "forwarded rewrite with TypeScript and ESM support",

@@ -6,3 +6,3 @@ import { IncomingMessage } from 'http'

*/
export function forwarded(req: IncomingMessage) {
export function forwarded(req: Pick<IncomingMessage, 'headers' | 'connection'>) {
// simple header parsing

@@ -9,0 +9,0 @@ const proxyAddrs = parse((req.headers['x-forwarded-for'] as string) || '')

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc