|
14 | 14 | using ServiceControl.Api; |
15 | 15 | using ServiceControl.Api.Contracts; |
16 | 16 |
|
17 | | -class ConfigurationApi(ActiveLicense license, |
18 | | - Settings settings, |
19 | | - IHttpClientFactory httpClientFactory, MassTransitConnectorHeartbeatStatus connectorHeartbeatStatus) : IConfigurationApi |
| 17 | +class ConfigurationApi(ActiveLicense license, Settings settings, IHttpClientFactory httpClientFactory, MassTransitConnectorHeartbeatStatus connectorHeartbeatStatus) : IConfigurationApi |
20 | 18 | { |
21 | 19 | public Task<RootUrls> GetUrls(string baseUrl, CancellationToken cancellationToken) |
22 | 20 | { |
| 21 | + if (!baseUrl.EndsWith('/')) |
| 22 | + { |
| 23 | + baseUrl += "/"; |
| 24 | + } |
| 25 | + |
23 | 26 | var model = new RootUrls |
24 | 27 | { |
25 | 28 | EndpointsUrl = baseUrl + "endpoints", |
26 | 29 | KnownEndpointsUrl = "/endpoints/known", // relative URI to allow proxying |
27 | 30 | SagasUrl = baseUrl + "sagas", |
28 | 31 | ErrorsUrl = baseUrl + "errors/{?page,per_page,direction,sort}", |
29 | 32 | EndpointsErrorUrl = baseUrl + "endpoints/{name}/errors/{?page,per_page,direction,sort}", |
30 | | - MessageSearchUrl = |
31 | | - baseUrl + "messages/search/{keyword}/{?page,per_page,direction,sort}", |
32 | | - EndpointsMessageSearchUrl = |
33 | | - baseUrl + |
34 | | - "endpoints/{name}/messages/search/{keyword}/{?page,per_page,direction,sort}", |
35 | | - EndpointsMessagesUrl = |
36 | | - baseUrl + "endpoints/{name}/messages/{?page,per_page,direction,sort}", |
| 33 | + MessageSearchUrl = baseUrl + "messages/search/{keyword}/{?page,per_page,direction,sort}", |
| 34 | + EndpointsMessageSearchUrl = baseUrl + "endpoints/{name}/messages/search/{keyword}/{?page,per_page,direction,sort}", |
| 35 | + EndpointsMessagesUrl = baseUrl + "endpoints/{name}/messages/{?page,per_page,direction,sort}", |
37 | 36 | AuditCountUrl = baseUrl + "endpoints/{name}/audit-count", |
38 | 37 | Name = SettingsReader.Read(Settings.SettingsRootNamespace, "Name", "ServiceControl"), |
39 | 38 | Description = SettingsReader.Read(Settings.SettingsRootNamespace, "Description", "The management backend for the Particular Service Platform"), |
|
0 commit comments