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:
Gary Sharp
2016-10-06 19:10:45 +11:00
parent b286f8473a
commit e082c22983
2 changed files with 23 additions and 17 deletions
+5 -1
View File
@@ -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);
}