Respond with Service Unavailable if not in correct network

This commit is contained in:
Cody Robibero
2024-01-06 14:43:19 -07:00
parent f49de51225
commit adb0837dc2
2 changed files with 5 additions and 0 deletions

View File

@@ -41,6 +41,8 @@ public class IPBasedAccessValidationMiddleware
if (!networkManager.HasRemoteAccess(remoteIP))
{
// No access from network, respond with 503 instead of 200.
httpContext.Response.StatusCode = (int)HttpStatusCode.ServiceUnavailable;
return;
}