case 4586
This commit is contained in:
@@ -33,10 +33,12 @@ namespace AyaNova.Api.Controllers
|
|||||||
[AllowAnonymous]
|
[AllowAnonymous]
|
||||||
[ProducesResponseType(typeof(string), 200)]
|
[ProducesResponseType(typeof(string), 200)]
|
||||||
[SwaggerOperation(OperationId = "Health_Get")]
|
[SwaggerOperation(OperationId = "Health_Get")]
|
||||||
|
[ResponseCache(Location = ResponseCacheLocation.None)]
|
||||||
public async Task<IActionResult> Get()
|
public async Task<IActionResult> Get()
|
||||||
{
|
{
|
||||||
var report = await _healthCheckService.CheckHealthAsync();
|
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());
|
return report.Status == HealthStatus.Healthy ? Ok(report.Status.ToString()) : StatusCode(503, report.Status.ToString());
|
||||||
}
|
}
|
||||||
}//eoc
|
}//eoc
|
||||||
|
|||||||
@@ -512,7 +512,8 @@ namespace AyaNova
|
|||||||
if (!bLocalReportRenderRequest)
|
if (!bLocalReportRenderRequest)
|
||||||
{
|
{
|
||||||
context.Response.StatusCode = 401;
|
context.Response.StatusCode = 401;
|
||||||
context.Response.Headers.Add("X-AyaNova-Authorization-Error", "E2004 - Authorization token replaced by more recent login");
|
//case 4586
|
||||||
|
context.Response.Headers.Append("X-AyaNova-Authorization-Error", "E2004 - Authorization token replaced by more recent login");
|
||||||
await context.Response.WriteAsync("E2004 - Authorization token replaced by more recent login");
|
await context.Response.WriteAsync("E2004 - Authorization token replaced by more recent login");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user