Comparing version 8.1.0 to 8.1.1
@@ -103,2 +103,3 @@ 'use strict'; | ||
delete options.headers.host; | ||
delete options.headers['content-length']; | ||
@@ -105,0 +106,0 @@ if (settings.acceptEncoding === false) { // Defaults to true |
{ | ||
"name": "h2o2", | ||
"description": "Proxy handler plugin for hapi.js", | ||
"version": "8.1.0", | ||
"version": "8.1.1", | ||
"repository": "git://github.com/hapijs/h2o2", | ||
@@ -6,0 +6,0 @@ "main": "lib/index.js", |
@@ -221,3 +221,5 @@ 'use strict'; | ||
.header('Custom1', 'custom header value 1') | ||
.header('X-Custom2', 'custom header value 2'); | ||
.header('X-Custom2', 'custom header value 2') | ||
.header('x-hostFound', request.headers.host) | ||
.header('x-content-length-found', request.headers['content-length']); | ||
}; | ||
@@ -232,3 +234,8 @@ | ||
const res = await server.inject('/headers'); | ||
const res = await server.inject({ | ||
url: '/headers', | ||
headers: { | ||
host: 'www.h2o2.com', 'content-length': 10000 | ||
} | ||
}); | ||
expect(res.statusCode).to.equal(200); | ||
@@ -238,2 +245,4 @@ expect(res.payload).to.equal('{\"status\":\"success\"}'); | ||
expect(res.headers['x-custom2']).to.equal('custom header value 2'); | ||
expect(res.headers['x-hostFound']).to.equal(undefined); | ||
expect(res.headers['x-content-length-found']).to.equal(undefined); | ||
@@ -305,3 +314,3 @@ await upstream.stop(); | ||
const server = await provisionServer(); | ||
const server = await provisionServer(); | ||
server.route({ method: 'GET', path: '/gzip', handler: { proxy: { host: 'localhost', port: upstream.info.port, passThrough: true } } }); | ||
@@ -571,3 +580,3 @@ | ||
const upstream = Hapi.server(); | ||
const upstream = Hapi.server(); | ||
await upstream.start(); | ||
@@ -574,0 +583,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
86137
1589