mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-08-31 19:08:29 +00:00
feat: add ServeDebugAppRequestHandler for serving debug app assets and improve error handling in LoginRequestHandler
Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
parent
9ea5ec5d1a
commit
ee240ca378
6 changed files with 288 additions and 36 deletions
|
|
@ -17,6 +17,9 @@ namespace PepperDash.Essentials.Core.Web
|
|||
{
|
||||
private readonly WebApiServer _server;
|
||||
|
||||
private readonly WebApiServer _debugServer;
|
||||
|
||||
|
||||
///<example>
|
||||
/// http(s)://{ipaddress}/cws/{basePath}
|
||||
/// http(s)://{ipaddress}/VirtualControl/Rooms/{roomId}/cws/{basePath}
|
||||
|
|
@ -70,6 +73,9 @@ namespace PepperDash.Essentials.Core.Web
|
|||
|
||||
_server = new WebApiServer(Key, Name, BasePath);
|
||||
|
||||
_debugServer = new WebApiServer($"{key}-debug-app", $"{name} Debug App", "/debug");
|
||||
_debugServer.SetFallbackHandler(new ServeDebugAppRequestHandler());
|
||||
|
||||
SetupRoutes();
|
||||
}
|
||||
|
||||
|
|
@ -242,6 +248,7 @@ namespace PepperDash.Essentials.Core.Web
|
|||
Debug.LogMessage(LogEventLevel.Verbose, "Starting Essentials Web API on {0} Appliance", is4Series ? "4-series" : "3-series");
|
||||
|
||||
_server.Start();
|
||||
_debugServer.Start();
|
||||
|
||||
GetPaths();
|
||||
|
||||
|
|
@ -252,7 +259,8 @@ namespace PepperDash.Essentials.Core.Web
|
|||
Debug.LogMessage(LogEventLevel.Verbose, "Starting Essentials Web API on Virtual Control Server");
|
||||
|
||||
_server.Start();
|
||||
|
||||
_debugServer.Start();
|
||||
|
||||
GetPaths();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue