Skip to content

Commit c56c510

Browse files
authored
Merge pull request #638 from HubSpot/add_hubapi_override
Add hubapi override
2 parents cad6c92 + b7d60e9 commit c56c510

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

packages/cli-lib/lib/urls.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,12 @@ const getHubSpotWebsiteOrigin = env => {
1313
};
1414

1515
const getHubSpotApiOrigin = (env, useLocalHost) => {
16-
return `https://${useLocalHost ? 'local' : 'api'}.hubapi${getEnvUrlString(
17-
env
18-
)}.com`;
16+
let domain = process.env.HUBAPI_DOMAIN_OVERRIDE;
17+
18+
if (!domain || typeof domain !== 'string') {
19+
domain = `${useLocalHost ? 'local' : 'api'}.hubapi${getEnvUrlString(env)}`;
20+
}
21+
return `https://${domain}.com`;
1922
};
2023

2124
module.exports = {

0 commit comments

Comments
 (0)