mirror of https://github.com/Jackett/Jackett
This commit is contained in:
parent
c01b8a3a33
commit
bd13e1256f
|
@ -0,0 +1,23 @@
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Microsoft.AspNetCore.Authorization;
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using Newtonsoft.Json.Linq;
|
||||||
|
|
||||||
|
namespace Jackett.Server.Controllers
|
||||||
|
{
|
||||||
|
[AllowAnonymous]
|
||||||
|
[Route("health")]
|
||||||
|
public class HealthcheckController : Controller
|
||||||
|
{
|
||||||
|
[HttpGet]
|
||||||
|
[HttpHead]
|
||||||
|
public Task<IActionResult> Health()
|
||||||
|
{
|
||||||
|
var jsonReply = new JObject
|
||||||
|
{
|
||||||
|
["status"] = "OK"
|
||||||
|
};
|
||||||
|
return Task.FromResult<IActionResult>(Json(jsonReply));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue