mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-07-25 14:41:30 +00:00
26 lines
No EOL
867 B
C#
26 lines
No EOL
867 B
C#
using LBPUnion.ProjectLighthouse.Configuration;
|
|
using LBPUnion.ProjectLighthouse.Servers.Website.Types;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
namespace LBPUnion.ProjectLighthouse.Servers.Website.Controllers;
|
|
|
|
[ApiController]
|
|
public class AutoDiscoverController: ControllerBase
|
|
{
|
|
[ResponseCache(Duration = 86400)]
|
|
[HttpGet("/autodiscover")]
|
|
[Produces("application/json")]
|
|
public IActionResult AutoDiscover()
|
|
{
|
|
AutoDiscoverResponse resp = new()
|
|
{
|
|
Version = 3,
|
|
Url = ServerConfiguration.Instance.GameApiExternalUrl,
|
|
ServerBrand = ServerConfiguration.Instance.Customization.ServerName,
|
|
UsesCustomDigestKey = false,
|
|
BannerImageUrl = null,
|
|
ServerDescription = ServerConfiguration.Instance.Customization.ServerDescription,
|
|
};
|
|
return this.Ok(resp);
|
|
}
|
|
} |