Skip to content

Commit 953ab8c

Browse files
blowsiePooya Parsa
authored and
Pooya Parsa
committedJun 14, 2019
feat: https detection (#260)
1 parent c4e73d0 commit 953ab8c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed
 

‎lib/module.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ function axiosModule(_moduleOptions) {
3333
// Default prefix
3434
const prefix = process.env.API_PREFIX || moduleOptions.prefix || '/'
3535

36+
// HTTPS
37+
const https = Boolean(this.options.server && this.options.server.https)
38+
3639
// Apply defaults
3740
const options = {
3841
baseURL: `http://${defaultHost}:${defaultPort}${prefix}`,
@@ -44,7 +47,7 @@ function axiosModule(_moduleOptions) {
4447
proxyHeadersIgnore: ['accept', 'host', 'cf-ray', 'cf-connecting-ip', 'content-length'],
4548
proxy: false,
4649
retry: false,
47-
https: false,
50+
https,
4851
...moduleOptions
4952
}
5053

0 commit comments

Comments
 (0)
Please sign in to comment.