diff --git a/lib/module.js b/lib/module.js index b32d301..2209d87 100755 --- a/lib/module.js +++ b/lib/module.js @@ -71,7 +71,7 @@ module.exports = function nuxtAxios (_moduleOptions) { // Convert http:// to https:// if https option is on if (options.https === true) { - const https = s => s.replace('http://', 'https://') + const https = s => s.indexOf('//localhost:') > -1 ? s : s.replace('http://', 'https://') options.baseURL = https(options.baseURL) options.browserBaseURL = https(options.browserBaseURL) }