mirror of https://github.com/sundowndev/http.git
fix: set default host
parent
bc6633f39a
commit
18e9b11c39
|
@ -86,7 +86,7 @@ function httpModule (_moduleOptions) {
|
|||
|
||||
// For static exporting
|
||||
if (nuxt.options.target === 'static') {
|
||||
nuxt.hook('listen', (_, { host, port }) => {
|
||||
nuxt.hook('listen', (_, { host = 'localhost', port }) => {
|
||||
publicRuntimeConfig.http.browserBaseURL = toHttps(publicRuntimeConfig.http.browserBaseURL || prefix || '/')
|
||||
privateRuntimeConfig.http.baseURL = toHttps(privateRuntimeConfig.http.baseURL || `http://${host}:${port}${prefix}`)
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue