Added OnWebAppBuild load step (#489)

* Fingers crossed this will fix the mod loading issue for configs

* Renamed classes and documentation for clarity

* Remove some extra traces of the old PreSptLoader

* Renamed interface for clarity and updated docs

* Re-introduced PreSptModLoad for now

---------

Co-authored-by: Alex <clodanSPT@hotmail.com>
This commit is contained in:
clodanSPT
2025-07-19 18:48:48 +01:00
committed by GitHub
parent ecdefef16c
commit 7b6f1eb9ad
6 changed files with 47 additions and 29 deletions
+3 -3
View File
@@ -121,9 +121,9 @@ public static class Program
builder.WebHost.ConfigureKestrel(
(_, options) =>
{
var httpConfig = options
.ApplicationServices.GetService<ConfigServer>()
?.GetConfig<HttpConfig>()!;
// This method is not expected to be async so we need to wait for the Task instead of using await keyword
options.ApplicationServices.GetService<OnWebAppBuildModLoader>()!.OnLoad().Wait();
var httpConfig = options.ApplicationServices.GetService<ConfigServer>()?.GetConfig<HttpConfig>()!;
var certHelper = options.ApplicationServices.GetService<CertificateHelper>()!;
options.Listen(
IPAddress.Parse(httpConfig.Ip),