Skip to content

Commit

Permalink
Merge pull request #1131 from forcedotcom/sm/workspaces-support
Browse files Browse the repository at this point in the history
feat: workspaces support for myDomain checks
  • Loading branch information
shetzel authored Aug 29, 2024
2 parents 3409db2 + 81dcfb3 commit 7bb65a4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/util/sfdcUrl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ export class SfdcUrl extends URL {
'.stm.salesforce.ms',
'.pc-rnd.force.com',
'.pc-rnd.salesforce.com',
'.wc.crm.dev', // workspaces container
];
return (
this.origin.startsWith('https://gs1.') ||
Expand Down
5 changes: 5 additions & 0 deletions test/unit/util/sfdcUrl.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,11 @@ describe('util/sfdcUrl', () => {
expect(url.isInternalUrl()).to.equal(true);
expect(url.isLocalUrl()).to.equal(true);
});
it('workspaces with port is internal but not local', () => {
const url = new SfdcUrl('https://dev.salesforce-com.shane-mclaughlin-0lrfx7zp3l121.wc.crm.dev:6101/');
expect(url.isInternalUrl()).to.equal(true);
expect(url.isLocalUrl()).to.equal(false);
});
});

describe('checkLightningDomain', () => {
Expand Down

0 comments on commit 7bb65a4

Please sign in to comment.