almost done

This commit is contained in:
zznty
2022-10-03 21:49:31 +07:00
parent f001aa4a7e
commit 5e508600f9
19 changed files with 435 additions and 145 deletions

View File

@@ -51,17 +51,17 @@ public class ApiServerManager : Manager
Statics.ChatModule = chatModule;
_server = new WebServer(o => o
.WithUrlPrefix(_config.Listener.UrlPrefix)
.WithMicrosoftHttpListener())
.WithLocalSessionManager()
.WithModule(apiModule
.WithController<ServerController>()
.WithController<SettingsController>()
.WithController<WorldsController>()
.WithController<ChatController>())
.WithModule(new LogsModule("/api/live/logs", true))
.WithModule(chatModule)
.WithBearerToken("/api", new SymmetricSecurityKey(Convert.FromBase64String(_config.SecurityKey)), new BasicAuthorizationServerProvider());
.WithUrlPrefix(_config.Listener.UrlPrefix)
.WithMicrosoftHttpListener())
.WithLocalSessionManager()
.WithModule(apiModule
.WithController<ServerController>()
.WithController<SettingsController>()
.WithController<WorldsController>()
.WithController<ChatController>())
.WithModule(new LogsModule("/api/live/logs", true))
.WithModule(chatModule)
.WithBearerToken("/api", new SymmetricSecurityKey(Convert.FromBase64String(_config.SecurityKey)), new BasicAuthorizationServerProvider());
}
public override void Attach()
@@ -92,4 +92,4 @@ public class ApiServerManager : Manager
return Convert.ToBase64String(aes.Key);
}
}
}