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

h2o2

Package Overview
Dependencies
Maintainers
5
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

h2o2 - npm Package Compare versions

Comparing version 6.0.2 to 6.1.0

8

lib/index.js

@@ -42,2 +42,3 @@ 'use strict';

onResponse: Joi.func(),
onRequest: Joi.func(),
agent: Joi.object(),

@@ -154,3 +155,3 @@ ttl: Joi.string().valid('upstream').allow(null),

Wreck.request(request.method, uri, options, (err, res) => {
const req = Wreck.request(request.method, uri, options, (err, res) => {

@@ -186,2 +187,7 @@ let ttl = null;

});
// if there is an onRequest handler, pass it
if (settings.onRequest) {
settings.onRequest(req);
}
});

@@ -188,0 +194,0 @@ };

2

package.json
{
"name": "h2o2",
"description": "Proxy handler plugin for hapi.js",
"version": "6.0.2",
"version": "6.1.0",
"repository": "git://github.com/hapijs/h2o2",

@@ -6,0 +6,0 @@ "main": "lib/index.js",

@@ -9,3 +9,3 @@ # h2o2

Lead Maintainer - [Oscar A. Funes Martinez](https://github.com/osukaa)
Lead Maintainer - [Sanjay Pandit](https://github.com/spanditcaa)

@@ -65,2 +65,4 @@ ## Introduction

* `headers` - optional object where each key is an HTTP request header and the value is the header content.
* `onRequest` - a custom function which is passed the upstream request. Function signature is `function (req)` where:
* `req` - the [wreck] (https://github.com/hapijs/wreck) request to the upstream server.
* `onResponse` - a custom function for processing the response from the upstream service before sending to the client. Useful for custom error handling of responses from the proxied endpoint or other payload manipulation. Function signature is `function (err, res, request, reply, settings, ttl)` where:

@@ -67,0 +69,0 @@ * `err` - internal or upstream error returned from attempting to contact the upstream proxy.

Sorry, the diff of this file is too big to display

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