File tree 2 files changed +3
-2
lines changed
2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ function axiosModule (_moduleOptions) {
89
89
90
90
// Convert http:// to https:// if https option is on
91
91
if ( options . https === true ) {
92
- const https = s => s . includes ( '//localhost:' ) ? s : s . replace ( 'http://' , 'https://' )
92
+ const https = s => s . replace ( 'http://' , 'https://' )
93
93
options . baseURL = https ( options . baseURL )
94
94
options . browserBaseURL = https ( options . browserBaseURL )
95
95
}
Original file line number Diff line number Diff line change @@ -29,7 +29,8 @@ const testSuite = () => {
29
29
expect ( addTemplate ) . toBeDefined ( )
30
30
const call = addTemplate . mock . calls . find ( args => args [ 0 ] . src . includes ( 'plugin.js' ) )
31
31
const options = call [ 0 ] . options
32
- expect ( options . baseURL . toString ( ) ) . toBe ( 'http://localhost:3000/test_api' )
32
+ const proto = options . https ? 'https' : 'http'
33
+ expect ( options . baseURL . toString ( ) ) . toBe ( `${ proto } ://localhost:3000/test_api` )
33
34
expect ( options . browserBaseURL . toString ( ) ) . toBe ( '/test_api' )
34
35
} )
35
36
You can’t perform that action at this time.
0 commit comments