mirror of
https://github.com/Caraxi/mare.server.git
synced 2025-12-14 13:24:15 +01:00
fix bug
This commit is contained in:
parent
53e96d9318
commit
71dd103dea
1 changed files with 3 additions and 1 deletions
|
|
@ -97,7 +97,9 @@ public class ServerFilesController : ControllerBase
|
||||||
if (!selectedShards.Any()) selectedShards = matchingShards;
|
if (!selectedShards.Any()) selectedShards = matchingShards;
|
||||||
}
|
}
|
||||||
|
|
||||||
var shard = selectedShards.OrderBy(g => Guid.NewGuid()).FirstOrDefault();
|
var shard = selectedShards
|
||||||
|
.OrderBy(s => s.Continents.Contains("*", StringComparer.Ordinal) ? 0 : 1)
|
||||||
|
.ThenBy(g => Guid.NewGuid()).FirstOrDefault();
|
||||||
|
|
||||||
var baseUrl = shard?.CdnFullUrl ?? _configuration.GetValue<Uri>(nameof(StaticFilesServerConfiguration.CdnFullUrl));
|
var baseUrl = shard?.CdnFullUrl ?? _configuration.GetValue<Uri>(nameof(StaticFilesServerConfiguration.CdnFullUrl));
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue