Skip to content

Commit

Permalink
feat: https detection (#106)
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardogobbosouza authored Jun 6, 2020
1 parent 836c655 commit 8ae0cd5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ function httpModule (_moduleOptions) {
delete moduleOptions.baseUrl
}

// HTTPS
const https = Boolean(this.options.server && this.options.server.https)

// Apply defaults
const options = {
baseURL: `http://${defaultHost}:${defaultPort}${prefix}`,
Expand All @@ -51,7 +54,7 @@ function httpModule (_moduleOptions) {
retry: false,
serverTimeout: false,
clientTimeout: false,
https: false,
https,
headers: {},
...moduleOptions
}
Expand Down Expand Up @@ -115,6 +118,7 @@ function httpModule (_moduleOptions) {
typeof options.proxy === 'object' ? options.proxy : {}
])
}

// Add `ky` to build.transpile
this.options.build = this.options.build || {}
this.options.build.transpile = this.options.build.transpile || {}
Expand Down

0 comments on commit 8ae0cd5

Please sign in to comment.