26 lines
711 B
C#
26 lines
711 B
C#
|
namespace FreeSR.Admin.Handlers
|
|||
|
{
|
|||
|
using Ceen;
|
|||
|
using FreeSR.Admin.Service;
|
|||
|
|
|||
|
internal class ConsolePageRequestHandler : IHttpModule
|
|||
|
{
|
|||
|
public async Task<bool> HandleAsync(IHttpContext context)
|
|||
|
{
|
|||
|
context.Response.StatusCode = HttpStatusCode.OK;
|
|||
|
await context.Response.WriteAllAsync(CreateHTMLDocument(), "text/html");
|
|||
|
|
|||
|
return true;
|
|||
|
}
|
|||
|
|
|||
|
private static string CreateHTMLDocument()
|
|||
|
{
|
|||
|
string baseString = HttpAdminService.ConsoleHTML;
|
|||
|
|
|||
|
return baseString.Replace("%SERVER_VERSION%", "v0.1.0 dev - experimental open source")
|
|||
|
.Replace("%GAME_VERSION%", "1.2.0");
|
|||
|
|
|||
|
}
|
|||
|
}
|
|||
|
}
|