From 8e90118e44b215c4cbc485506486e1fd52e6b69f Mon Sep 17 00:00:00 2001 From: Julian Giebel Date: Thu, 21 Sep 2023 14:35:00 +0200 Subject: [PATCH] Fix generated map urls ignoring PathBase (#6) * Fix fetching submodules ignoring update rule set to none Bump version to 1.1.1 * Replace libgit2sharp (#3) * Work on ssh support for repositories * Add git check to preflight checks Replace libgit2sharp with just running git commands using process * Implement reverse proxy header and path base configuration options Bump version number * Fix generated urls for maps not taking PathBase into account --- SS14.MapServer/Controllers/GitHubWebhookController.cs | 2 +- SS14.MapServer/Controllers/MapController.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/SS14.MapServer/Controllers/GitHubWebhookController.cs b/SS14.MapServer/Controllers/GitHubWebhookController.cs index 02aa9c3..3d5bea4 100644 --- a/SS14.MapServer/Controllers/GitHubWebhookController.cs +++ b/SS14.MapServer/Controllers/GitHubWebhookController.cs @@ -286,7 +286,7 @@ private string GetGridImageUrl(Guid mapGuid, int gridId) { //Can't access Url.Action here return - $"{_serverConfiguration.Host.Scheme}://{_serverConfiguration.Host.Host}:{_serverConfiguration.Host.Port}/api/Image/grid/{mapGuid}/{gridId}"; + $"{_serverConfiguration.Host.Scheme}://{_serverConfiguration.Host.Host}:{_serverConfiguration.Host.Port}{_serverConfiguration.PathBase}/api/Image/grid/{mapGuid}/{gridId}"; } } diff --git a/SS14.MapServer/Controllers/MapController.cs b/SS14.MapServer/Controllers/MapController.cs index bf49382..9ae3108 100644 --- a/SS14.MapServer/Controllers/MapController.cs +++ b/SS14.MapServer/Controllers/MapController.cs @@ -288,7 +288,7 @@ private Map SetMapGridUrls(Map map) "Image", new { id = map.MapGuid, gridId = grid.GridId }, _serverConfiguration.Host.Scheme, - $"{_serverConfiguration.Host.Host}:{_serverConfiguration.Host.Port}" + $"{_serverConfiguration.Host.Host}:{_serverConfiguration.Host.Port}{_serverConfiguration.PathBase}" ); } map.Grids.Sort((grid, grid1) => grid1.Extent.CompareTo(grid.Extent));