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

request-headers-filter

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

request-headers-filter

Filter headers from request which will be passed to new request and/or response

  • 1.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-75%
Maintainers
1
Weekly downloads
 
Created
Source

Request headers filter

Filter headers from request which will be passed to new request and/or response

npm version npm Dependency Status License: MIT Travis-CI codecov

Installation

via npm

   npm install --save request-headers-filter

or Yarn

   yarn add request-headers-filter

Example

const express = require('express');
const request = require('request');
const requestHeadersFilter = require('request-headers-filter');

const app = express();

app.get('/', (req, res) => {
  const requestStream = request('https://github.com/L2jLiga/request-headers-filter');

  requestHeadersFilter.saveHeaders(requestStream, res, ['content-type', 'cookie']);

  req.pipe(requestStream).pipe(res);
});

Usefull cases

  1. When you want to save several headers
  2. When you use Transform stream to change response

Keywords

FAQs

Package last updated on 31 Jul 2018

Did you know?

Socket

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.

Install

Related posts

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