Skip to content

Commit

Permalink
feat: https detection (#260)
Browse files Browse the repository at this point in the history
  • Loading branch information
blowsie authored and Pooya Parsa committed Jun 14, 2019
1 parent c4e73d0 commit 953ab8c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ function axiosModule(_moduleOptions) {
// Default prefix
const prefix = process.env.API_PREFIX || moduleOptions.prefix || '/'

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

// Apply defaults
const options = {
baseURL: `http://${defaultHost}:${defaultPort}${prefix}`,
Expand All @@ -44,7 +47,7 @@ function axiosModule(_moduleOptions) {
proxyHeadersIgnore: ['accept', 'host', 'cf-ray', 'cf-connecting-ip', 'content-length'],
proxy: false,
retry: false,
https: false,
https,
...moduleOptions
}

Expand Down

0 comments on commit 953ab8c

Please sign in to comment.