Critical function message wording
Critical functions require a localhost connection. Instead of reporting 503 Service Unavailable, report a useful message.
This commit is contained in:
@@ -10,7 +10,11 @@ namespace Disco.Web.Controllers
|
||||
{
|
||||
if (!Request.IsLocal && !InitialConfigController.ServerIsCoreSKU.Value)
|
||||
{
|
||||
filterContext.Result = new HttpStatusCodeResult(System.Net.HttpStatusCode.ServiceUnavailable, "Initialization Configuration of Disco is only allowed via a local connection");
|
||||
filterContext.Result = new ContentResult()
|
||||
{
|
||||
Content = "Maintenance of Disco ICT is only allowed via a localhost connection",
|
||||
ContentType = "text/plain"
|
||||
};
|
||||
}
|
||||
base.OnActionExecuting(filterContext);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user