mirror of
https://github.com/Infisical/infisical.git
synced 2026-01-08 23:18:05 -05:00
Fix getGitHubGatewayConnectionDetails to use the correct hostname without any url paths
This commit is contained in:
@@ -53,9 +53,13 @@ export const getGitHubGatewayConnectionDetails = async (
|
||||
targetHost: string,
|
||||
gatewayV2Service: Pick<TGatewayV2ServiceFactory, "getPlatformConnectionDetailsByGatewayId">
|
||||
): Promise<Awaited<ReturnType<TGatewayV2ServiceFactory["getPlatformConnectionDetailsByGatewayId"]>>> => {
|
||||
const urlString = targetHost.includes("://") ? targetHost : `https://${targetHost}`;
|
||||
const url = new URL(urlString);
|
||||
const { hostname } = url;
|
||||
|
||||
return gatewayV2Service.getPlatformConnectionDetailsByGatewayId({
|
||||
gatewayId,
|
||||
targetHost,
|
||||
targetHost: hostname,
|
||||
targetPort: 443
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user