case 4586

This commit is contained in:
2024-05-07 19:54:41 +00:00
parent 297ffa7006
commit ad5db64b65
2 changed files with 5 additions and 2 deletions

View File

@@ -33,10 +33,12 @@ namespace AyaNova.Api.Controllers
[AllowAnonymous]
[ProducesResponseType(typeof(string), 200)]
[SwaggerOperation(OperationId = "Health_Get")]
[ResponseCache(Location = ResponseCacheLocation.None)]
public async Task<IActionResult> Get()
{
var report = await _healthCheckService.CheckHealthAsync();
Response.Headers.Add("Cache-Control", "no-store, no-cache");
//case 4586 - warning here due to .net update put into responsecache attribute instead
//Response.Headers.Add("Cache-Control", "no-store, no-cache");
return report.Status == HealthStatus.Healthy ? Ok(report.Status.ToString()) : StatusCode(503, report.Status.ToString());
}
}//eoc