Skip to content
Browse files

feat: disable https for localhost url (#93)

  • Loading branch information
yahtnif authored and pi0 committed Mar 5, 2018
1 parent fe16981 commit dd677341a6425899ad1af0fe2f8f38f7527b746f
Showing with 1 addition and 1 deletion.
  1. +1 −1 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)

2 comments on commit dd67734


This comment has been minimized.

Copy link

@blowsie blowsie replied Mar 16, 2020

Im not sure why this have been implemented but it feels like a developer issue to me. What if someone wants to use https on localhost?


This comment has been minimized.

Copy link

@pi0 pi0 replied Mar 17, 2020

Hi @blowsie. I'm kinda biased about this. Default values and convent options like https are also about developer experience to reduce dev issues (which mostly don't use https for localhost)

Please sign in to comment.