u
This commit is contained in:
parent
3e186ad46a
commit
be2e61b516
@ -151,8 +151,8 @@ export default {
|
|||||||
return route
|
return route
|
||||||
}
|
}
|
||||||
|
|
||||||
const hostname = envar.servHostname || globalThis.window?.location?.hostname || 'localhost'
|
const hostname = envar.servHostname || 'localhost'
|
||||||
const port = envar.servPort || globalThis.window?.location?.port || ''
|
const port = envar.servPort || ''
|
||||||
const protocol = hostname === 'localhost' ? 'http' : envar.servProtocol || (process.env.NODE_ENV === 'production' ? 'https' : 'http')
|
const protocol = hostname === 'localhost' ? 'http' : envar.servProtocol || (process.env.NODE_ENV === 'production' ? 'https' : 'http')
|
||||||
|
|
||||||
return `${protocol}://${hostname}${port ? ':' : ''}${port}/${route.replace(/^\//, '')}`
|
return `${protocol}://${hostname}${port ? ':' : ''}${port}/${route.replace(/^\//, '')}`
|
||||||
|
Loading…
Reference in New Issue
Block a user