mockttp
Version:
Mock HTTP server for testing HTTP clients and stubbing webservices
14 lines • 574 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.shouldPassThrough = shouldPassThrough;
function shouldPassThrough(hostname,
// Only one of these two should have values (validated above):
passThroughPatterns, interceptOnlyPatterns) {
if (!hostname)
return false;
if (interceptOnlyPatterns) {
return !interceptOnlyPatterns.some((pattern) => pattern.test(`https://${hostname}`));
}
return passThroughPatterns.some((pattern) => pattern.test(`https://${hostname}`));
}
//# sourceMappingURL=server-utils.js.map