File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ function axiosModule (_moduleOptions) {
8989
9090 // Convert http:// to https:// if https option is on
9191 if ( options . https === true ) {
92- const https = s => s . includes ( '//localhost:' ) ? s : s . replace ( 'http://' , 'https://' )
92+ const https = s => s . replace ( 'http://' , 'https://' )
9393 options . baseURL = https ( options . baseURL )
9494 options . browserBaseURL = https ( options . browserBaseURL )
9595 }
Original file line number Diff line number Diff line change @@ -29,7 +29,8 @@ const testSuite = () => {
2929 expect ( addTemplate ) . toBeDefined ( )
3030 const call = addTemplate . mock . calls . find ( args => args [ 0 ] . src . includes ( 'plugin.js' ) )
3131 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` )
3334 expect ( options . browserBaseURL . toString ( ) ) . toBe ( '/test_api' )
3435 } )
3536
You can’t perform that action at this time.
0 commit comments