feat(gen1): guarded live-update bridge to existing OGL node updater
This commit is contained in:
1 parent
a542ced14c
commit
cb6006ade4
10 files changed
+143
-6
No files matched your search
@@ -68,7 +68,15 @@ public sealed class OSWebInterfaceModule : ISharedRegionModule
|
||||
(endpoint.Scheme == Uri.UriSchemeHttp || endpoint.Scheme == Uri.UriSchemeHttps))
|
||||
services.Add((item.Section, endpoint));
|
||||
}
|
||||
_server = new AdminHttpServer(_scenes, _storage, _port, retention, services);
|
||||
IConfig? node = source?.Configs["NexVerseNodeAgent"];
|
||||
bool liveAllowed = c?.GetBoolean("AllowLiveUpdates", false) == true &&
|
||||
node?.GetBoolean("Enabled", false) == true &&
|
||||
node.GetBoolean("LiveUpdateEnabled", false);
|
||||
string nodeId = node?.GetString("NodeId", Environment.MachineName) ?? Environment.MachineName;
|
||||
string liveUrl = node?.GetString("LiveUpdateServiceUrl", "http://127.0.0.1:19090") ?? "";
|
||||
string liveToken = Environment.GetEnvironmentVariable("OGL_NODE_UPDATER_TOKEN") ?? "";
|
||||
var bridge = new LiveUpdateBridge(liveAllowed, nodeId, liveUrl, liveToken);
|
||||
_server = new AdminHttpServer(_scenes, _storage, _port, retention, services, bridge);
|
||||
_server.Start();
|
||||
Log.Info($"[OS WEBINTERFACE] Enabled on http://127.0.0.1:{_port}/ (loopback only). Configure an HTTPS reverse proxy for remote access.");
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user