@godaddy/terminus
Advanced tools
Comparing version 4.3.0 to 4.3.1
@@ -68,3 +68,3 @@ 'use strict' | ||
server.on('request', async (req, res) => { | ||
const url = caseInsensitive ? req.url : req.url.toLowerCase() | ||
const url = caseInsensitive ? req.url.toLowerCase() : req.url | ||
const healthCheck = healthChecks[url] | ||
@@ -71,0 +71,0 @@ if (healthCheck) { |
@@ -87,2 +87,20 @@ 'use strict' | ||
it('case insensitive opt-in - should working with original path', async () => { | ||
let onHealthCheckRan = false | ||
createTerminus(server, { | ||
healthChecks: { | ||
'/healthCheck': () => { | ||
onHealthCheckRan = true | ||
return Promise.resolve() | ||
} | ||
}, | ||
caseInsensitive: true | ||
}) | ||
server.listen(8000) | ||
await fetch('http://localhost:8000/healthCheck') | ||
expect(onHealthCheckRan).to.eql(true) | ||
}) | ||
it('includes info on resolve', async () => { | ||
@@ -89,0 +107,0 @@ let onHealthCheckRan = false |
{ | ||
"name": "@godaddy/terminus", | ||
"version": "4.3.0", | ||
"version": "4.3.1", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
44405
1095
34