mirror of https://github.com/sundowndev/http.git
feat: don't rely on hostname for default values
parent
81106bf7d7
commit
dadd7d8e2b
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue