diff --git a/packages/artifact/src/internal/shared/artifact-twirp-client.ts b/packages/artifact/src/internal/shared/artifact-twirp-client.ts index 444e3fac..09355808 100644 --- a/packages/artifact/src/internal/shared/artifact-twirp-client.ts +++ b/packages/artifact/src/internal/shared/artifact-twirp-client.ts @@ -52,8 +52,8 @@ class ArtifactHttpClient implements Rpc { contentType: 'application/json' | 'application/protobuf', data: object | Uint8Array ): Promise { - const url = `${this.baseUrl}/twirp/${service}/${method}` - debug(`Requesting ${url}`) + const url = new URL(`/twirp/${service}/${method}`, this.baseUrl).href + debug(`Requesting: ${url}`) const headers = { 'Content-Type': contentType } diff --git a/packages/artifact/src/internal/shared/config.ts b/packages/artifact/src/internal/shared/config.ts index eb122207..a5631bfc 100644 --- a/packages/artifact/src/internal/shared/config.ts +++ b/packages/artifact/src/internal/shared/config.ts @@ -19,7 +19,8 @@ export function getResultsServiceUrl(): string { if (!resultsUrl) { throw new Error('Unable to get the ACTIONS_RESULTS_URL env variable') } - return resultsUrl + + return new URL(resultsUrl).origin } export function isGhes(): boolean {