diff --git a/src/fhir-candle/Program.cs b/src/fhir-candle/Program.cs index 18c21d3..d2edd9f 100644 --- a/src/fhir-candle/Program.cs +++ b/src/fhir-candle/Program.cs @@ -374,12 +374,22 @@ public static async Task RunServer( return general; } - if (general.EndsWith('/')) + if (general.EndsWith("v1/")) { return general + relative; } - return general + "/" + relative; + if (general.EndsWith("v1")) + { + return general + "/" + relative; + } + + if (general.EndsWith('/')) + { + return general + "v1/" + relative; + } + + return general + "/v1/" + relative; } return null; @@ -403,19 +413,19 @@ private static void ConfigureOpenTelemetry(CandleConfig config, WebApplicationBu string? traceEndpoint = getTelemetryUrl( config.OpenTelemetryTracesEndpoint, config.OpenTelemetryEndpoint, - "v1/traces", + "traces", protocol); string? metricsEndpoint = getTelemetryUrl( config.OpenTelemetryMetricsEndpoint, config.OpenTelemetryEndpoint, - "v1/metrics", + "metrics", protocol); string? logsEndpoint = getTelemetryUrl( config.OpenTelemetryLogsEndpoint, config.OpenTelemetryEndpoint, - "v1/logs", + "logs", protocol); if (logsEndpoint != null) diff --git a/src/fhir-candle/_ForPackages/FhirCiClient.cs b/src/fhir-candle/_ForPackages/FhirCiClient.cs index c13fc23..8f83868 100644 --- a/src/fhir-candle/_ForPackages/FhirCiClient.cs +++ b/src/fhir-candle/_ForPackages/FhirCiClient.cs @@ -316,7 +316,7 @@ private async Task> downloadCoreQAs() BuildDate = ciBuildDate, BuildDateIso = ciBuildDate, FhirVersion = ciFhirVersion, - RepositoryUrl = "HL7/fhir/branches/master/qa.json" + RepositoryUrl = $"HL7/fhir/branches/{ciBranchRec.Name}/qa.json" }); } }