feat: don't rely on hostname for default values

master
Pooya Parsa 2017-09-12 03:20:18 +04:30
parent 81106bf7d7
commit dadd7d8e2b
1 changed files with 1 additions and 2 deletions

View File

@ -1,6 +1,5 @@
const chalk = require('chalk')
const path = require('path')
const { hostname } = require('os')
const { URL } = require('whatwg-url')
const debug = require('debug')('nuxt:axios')
@ -9,7 +8,7 @@ module.exports = function nuxtAxios (moduleOptions) {
let host = process.env.HOST || process.env.npm_package_config_nuxt_host || 'localhost'
/* istanbul ignore if */
if (host === '0.0.0.0') {
host = hostname()
host = 'localhost'
}
// Apply defaults