@hashicorp/api-double
Advanced tools
Comparing version 1.4.2 to 1.4.3
@@ -51,4 +51,10 @@ module.exports = function(resolve, find, render, YAML, mutate) { | ||
result = mutate(request, result, config); | ||
let status = 200; | ||
if (config.headers) { | ||
response.set(config.headers.response || {}); | ||
if(config.headers.response) { | ||
response.set(config.headers.response); | ||
if(config.headers.response['Status-Code']) { | ||
status = config.headers.response['Status-Code']; | ||
} | ||
} | ||
} | ||
@@ -58,7 +64,7 @@ switch (true) { | ||
return setTimeoutPromised(function() { | ||
return response.send(result); | ||
return response.send(status, result); | ||
}, config.latency); | ||
break; | ||
default: | ||
return response.send(result); | ||
return response.send(status, result); | ||
} | ||
@@ -65,0 +71,0 @@ }) |
{ | ||
"name": "@hashicorp/api-double", | ||
"version": "1.4.2", | ||
"version": "1.4.3", | ||
"description": "api-double serving via HTTP or other means", | ||
@@ -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
29571
321