Skip to content

Commit

Permalink
fix(veriry): allow self-signed certificates in provider verification. F…
Browse files Browse the repository at this point in the history
…ixes #280
  • Loading branch information
mefellows committed Mar 11, 2019
1 parent ca8cf8c commit 122eb24
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/dsl/verifier.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export interface VerifierOptions {
monkeypatch?: string
format?: "json" | "RspecJunitFormatter"
out?: string
validateSSL?: boolean
}

export class Verifier {
Expand Down Expand Up @@ -155,6 +156,7 @@ export class Verifier {
app.all("/*", (req, res) => {
logger.debug("Proxing", req.path)
proxy.web(req, res, {
secure: this.config.validateSSL === true,
target: this.config.providerBaseUrl,
})
})
Expand Down Expand Up @@ -204,6 +206,10 @@ export class Verifier {
}
})

if (this.config.validateSSL === undefined) {
this.config.validateSSL = true
}

if (this.config.logLevel && !isEmpty(this.config.logLevel)) {
serviceFactory.logLevel(this.config.logLevel)
logger.level(this.config.logLevel)
Expand Down

0 comments on commit 122eb24

Please sign in to comment.