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

healthchecks

Package Overview
Dependencies
Maintainers
2
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

healthchecks - npm Package Compare versions

Comparing version 1.7.1 to 1.7.2

5

CHANGELOG.md

@@ -0,1 +1,6 @@

## Version 1.7.2 2015-12-15
ADDED checks for HTTPS URLs now set `X-Forwarded-Proto`
## Version 1.7.1 2015-12-09

@@ -2,0 +7,0 @@

3

lib/healthchecks.js

@@ -126,3 +126,4 @@ // Exports an Express middleware factory.

headers: Object.assign({}, headers, {
'Host': loopbackURL.hostname
'Host': loopbackURL.hostname,
'X-Forwarded-Proto': loopbackURL.protocol.replace(/:$/, '')
})

@@ -129,0 +130,0 @@ };

{
"name": "healthchecks",
"version": "1.7.1",
"version": "1.7.2",
"engines": {

@@ -5,0 +5,0 @@ "node": ">=4.0.0"

@@ -9,2 +9,3 @@ const express = require('express');

server.enable('trust proxy');

@@ -82,1 +83,9 @@ // We have two test suites that want to run the same test server.

});
// Test HTTPS
server.get('/ssl-required', function(req, res) {
if (req.protocol === 'https')
res.status(200).send('');
else
res.status(403).send('');
});

@@ -28,2 +28,3 @@ const Browser = require('zombie');

browser.assert.text('.passed li:nth-of-type(6)', /timeout \d[.\d]* ms/);
browser.assert.text('.passed li:nth-of-type(7)', /https:\/\/localhost\/ssl-required \d[.\d]* ms/);
done();

@@ -69,3 +70,3 @@ });

browser.assert.text('.failed li:nth-of-type(2)', /redirect => socket hang up \d[.\d]* ms/);
browser.assert.elements('.passed li', 4);
browser.assert.elements('.passed li', 5);
done();

@@ -155,2 +156,20 @@ });

});
describe('to HTTPS page', function() {
before(function() {
server.locals.redirect = 'https://localhost/ssl-required';
});
it('should see a passing test', function(done) {
browser.visit(checksURL, function() {
browser.assert.text('h1', 'Passed');
browser.assert.text('.passed li:nth-of-type(4)', /redirect \d[.\d]* ms/);
done();
});
});
after(function() {
server.locals.redirect = false;
});
});
});

@@ -169,3 +188,3 @@

browser.assert.text('.failed li:nth-of-type(1)', /error => socket hang up \d[.\d]* ms/);
browser.assert.elements('.passed li', 5);
browser.assert.elements('.passed li', 6);
done();

@@ -193,3 +212,3 @@ });

browser.assert.text('.failed li:nth-of-type(1)', /timeout => timeout \d[.\d]* s/);
browser.assert.elements('.passed li', 5);
browser.assert.elements('.passed li', 6);
done();

@@ -215,3 +234,3 @@ });

browser.assert.text('.failed li:nth-of-type(1)', /status => 400 \d[.\d]* ms/);
browser.assert.elements('.passed li', 5);
browser.assert.elements('.passed li', 6);
done();

@@ -237,3 +256,3 @@ });

browser.assert.text('.failed li:nth-of-type(1)', /expected => body \d[.\d]* ms/);
browser.assert.elements('.passed li', 5);
browser.assert.elements('.passed li', 6);
done();

@@ -259,3 +278,3 @@ });

browser.assert.text('.failed li:nth-of-type(1)', /\/\/admin.localhost\/subdomain => 404 \d[.\d]* ms/);
browser.assert.elements('.passed li', 5);
browser.assert.elements('.passed li', 6);
done();

@@ -262,0 +281,0 @@ });

Sorry, the diff of this file is not supported yet

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