Skip to content

Commit 364c0c4

Browse files
committed
fix standby url base, use dns friendly owner name
1 parent c2caf6c commit 364c0c4

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/mcp/actors.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export async function isActorMCPServer(actorID: string, _apifyToken: string): Pr
99
export async function getActorsMCPServerURL(actorID: string, _apifyToken: string): Promise<string> {
1010
// TODO: get from API instead
1111
const standbyBaseUrl = process.env.HOSTNAME === 'mcp-securitybyobscurity.apify.com' ?
12-
'.mcp-securitybyobscurity.apify.actor' : '.apify.actor';
12+
'securitybyobscurity.apify.actor' : 'apify.actor';
1313
const standbyUrl = getActorStandbyURL(actorID, standbyBaseUrl);
1414
return `${standbyUrl}/sse`;
1515
}

src/mcp/utils.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ export function getActorStandbyURL(actorID: string, standbyBaseUrl = 'apify.acto
7676
throw new Error(`Invalid actor ID: ${actorID}`);
7777
}
7878

79-
const prefix = actorOwner === APIFY_USERNAME ? '' : `${actorOwner}--`;
79+
const actorOwnerDNSFriendly = actorOwner.replace('.', '-');
80+
const prefix = actorOwner === APIFY_USERNAME ? '' : `${actorOwnerDNSFriendly}--`;
8081

8182
return `https://${prefix}${actorName}.${standbyBaseUrl}`;
8283
}

0 commit comments

Comments
 (0)