mirror of
https://github.com/Jackett/Jackett.git
synced 2025-12-19 12:58:04 +01:00
This commit is contained in:
23
src/Jackett.Server/Controllers/HealthcheckController.cs
Normal file
23
src/Jackett.Server/Controllers/HealthcheckController.cs
Normal file
@@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user