Updates
This commit is contained in:
@@ -13,6 +13,9 @@ type GrabHostNamesReturn = {
|
||||
type Param = {
|
||||
userId?: string | number;
|
||||
env?: { [k: string]: string };
|
||||
remoteHost?: string;
|
||||
remoteHostPort?: string;
|
||||
useDefault?: boolean;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -26,10 +29,15 @@ export default function grabHostNames(param?: Param): GrabHostNamesReturn {
|
||||
const scheme = finalEnv["DSQL_HTTP_SCHEME"];
|
||||
const localHost = finalEnv["DSQL_LOCAL_HOST"];
|
||||
const localHostPort = finalEnv["DSQL_LOCAL_HOST_PORT"];
|
||||
const remoteHost = finalEnv["DSQL_API_REMOTE_HOST"]?.match(/.*\..*/)
|
||||
|
||||
const remoteHost = param?.useDefault
|
||||
? undefined
|
||||
: finalEnv["DSQL_API_REMOTE_HOST"]?.match(/.*\..*/)
|
||||
? finalEnv["DSQL_API_REMOTE_HOST"]
|
||||
: undefined;
|
||||
const remoteHostPort = finalEnv["DSQL_API_REMOTE_HOST_PORT"]?.match(/./)
|
||||
const remoteHostPort = param?.useDefault
|
||||
? undefined
|
||||
: finalEnv["DSQL_API_REMOTE_HOST_PORT"]?.match(/./)
|
||||
? finalEnv["DSQL_API_REMOTE_HOST_PORT"]
|
||||
: undefined;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user