Do not require domain in SDK and ExternalAPI
This commit is contained in:
parent
1748049322
commit
737419dbe8
|
@ -378,8 +378,11 @@ export function urlObjectToString(o: Object): ?string {
|
||||||
//
|
//
|
||||||
// It may be host/hostname and pathname with the latter denoting the
|
// It may be host/hostname and pathname with the latter denoting the
|
||||||
// tenant.
|
// tenant.
|
||||||
|
const domain = o.domain || o.host || o.hostname;
|
||||||
|
|
||||||
|
if (domain) {
|
||||||
const { host, hostname, pathname: contextRoot, port }
|
const { host, hostname, pathname: contextRoot, port }
|
||||||
= parseStandardURIString(o.domain || o.host || o.hostname);
|
= parseStandardURIString(domain);
|
||||||
|
|
||||||
// authority
|
// authority
|
||||||
if (host) {
|
if (host) {
|
||||||
|
@ -391,6 +394,7 @@ export function urlObjectToString(o: Object): ?string {
|
||||||
// pathname
|
// pathname
|
||||||
pathname === '/' && contextRoot !== '/' && (pathname = contextRoot);
|
pathname === '/' && contextRoot !== '/' && (pathname = contextRoot);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// pathname
|
// pathname
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue