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

@hapi/h2o2

Package Overview
Dependencies
Maintainers
7
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hapi/h2o2 - npm Package Compare versions

Comparing version 9.0.1 to 9.0.2

52

lib/index.js

@@ -7,3 +7,3 @@ 'use strict';

const Hoek = require('@hapi/hoek');
const Joi = require('@hapi/joi');
const Validate = require('@hapi/validate');
const Wreck = require('@hapi/wreck');

@@ -32,27 +32,27 @@

internals.schema = Joi.object({
httpClient: Joi.object({
request: Joi.func(),
parseCacheControl: Joi.func()
internals.schema = Validate.object({
httpClient: Validate.object({
request: Validate.func(),
parseCacheControl: Validate.func()
}),
host: Joi.string(),
port: Joi.number().integer(),
protocol: Joi.string().valid('http', 'https', 'http:', 'https:'),
uri: Joi.string(),
passThrough: Joi.boolean(),
localStatePassThrough: Joi.boolean(),
acceptEncoding: Joi.boolean().when('passThrough', { is: true, otherwise: Joi.forbidden() }),
rejectUnauthorized: Joi.boolean(),
xforward: Joi.boolean(),
redirects: Joi.number().min(0).integer().allow(false),
timeout: Joi.number().integer(),
mapUri: Joi.func(),
onResponse: Joi.func(),
onRequest: Joi.func(),
agent: Joi.object(),
ttl: Joi.string().valid('upstream').allow(null),
maxSockets: Joi.number().positive().allow(false),
secureProtocol: Joi.string(),
ciphers: Joi.string(),
downstreamResponseTime: Joi.boolean()
host: Validate.string(),
port: Validate.number().integer(),
protocol: Validate.string().valid('http', 'https', 'http:', 'https:'),
uri: Validate.string(),
passThrough: Validate.boolean(),
localStatePassThrough: Validate.boolean(),
acceptEncoding: Validate.boolean().when('passThrough', { is: true, otherwise: Validate.forbidden() }),
rejectUnauthorized: Validate.boolean(),
xforward: Validate.boolean(),
redirects: Validate.number().min(0).integer().allow(false),
timeout: Validate.number().integer(),
mapUri: Validate.func(),
onResponse: Validate.func(),
onRequest: Validate.func(),
agent: Validate.object(),
ttl: Validate.string().valid('upstream').allow(null),
maxSockets: Validate.number().positive().allow(false),
secureProtocol: Validate.string(),
ciphers: Validate.string(),
downstreamResponseTime: Validate.boolean()
})

@@ -86,3 +86,3 @@ .xor('host', 'mapUri', 'uri')

const settings = Hoek.applyToDefaults(internals.defaults, handlerOptions, { shallow: ['agent'] });
Joi.assert(handlerOptions, internals.schema, 'Invalid proxy handler options (' + route.path + ')');
Validate.assert(handlerOptions, internals.schema, 'Invalid proxy handler options (' + route.path + ')');
Hoek.assert(!route.settings.payload || ((route.settings.payload.output === 'data' || route.settings.payload.output === 'stream') && !route.settings.payload.parse), 'Cannot proxy if payload is parsed or if output is not stream or data');

@@ -89,0 +89,0 @@ settings.mapUri = handlerOptions.mapUri || internals.mapUri(handlerOptions.protocol, handlerOptions.host, handlerOptions.port, handlerOptions.uri);

{
"name": "@hapi/h2o2",
"description": "Proxy handler plugin for hapi.js",
"version": "9.0.1",
"version": "9.0.2",
"repository": "git://github.com/hapijs/h2o2",
"main": "lib/index.js",
"engines": {
"node": ">=12.0.0"
},
"files": [

@@ -20,3 +23,3 @@ "lib"

"@hapi/hoek": "9.x.x",
"@hapi/joi": "17.x.x",
"@hapi/validate": "1.x.x",
"@hapi/wreck": "17.x.x"

@@ -26,5 +29,5 @@ },

"@hapi/code": "8.x.x",
"@hapi/hapi": "19.x.x",
"@hapi/hapi": "20.x.x",
"@hapi/inert": "6.x.x",
"@hapi/lab": "22.x.x"
"@hapi/lab": "24.x.x"
},

@@ -31,0 +34,0 @@ "scripts": {

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