mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-07-28 07:58:40 +00:00
Implement refresh autodiscover
This commit is contained in:
parent
aeba706391
commit
91e10d2dab
4 changed files with 48 additions and 1 deletions
|
@ -0,0 +1,26 @@
|
|||
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);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue