You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Logger.LogWarning("Blocked client attempted to connect",[
48
+
("Client",request.RemoteEndPoint)
49
+
]);
50
+
51
+
SendPageResponse(response,"<html><body><h2>Forbidden</h2><p>Your client is forbidden from accessing this server</p></body></html>","Text/HTML",403,"Forbidden");
SendPageResponse(response,"The requested resource failed to build","text/html",500,"Server Error");
123
+
return;
124
+
}
125
+
126
+
try
127
+
{
128
+
vardata=script.CreatePage();
129
+
SendPageResponse(response,data,contentType);
130
+
return;
131
+
}
132
+
catch(Exceptionex)
133
+
{
134
+
SendPageResponse(response,$"The requested resource encountered an exception while running {ex.ToString().Replace("<",">")}","text/html",500,"Server Error");
if(client.Client.RemoteEndPointis not EndPointremote||remote.AddressFamily!=AddressFamily.InterNetwork)
130
-
{
131
-
Logger.LogWarning("Refusing a client with bad or unsupported IP information");
132
-
varresponse=Utilities.GenerateResponse(421u,"Misdirected Request","<h1>Misdirected Request</h1><p>Unable to service your device's IP configuration</p>","text/html",true);
Logger.LogWarning("Refusing a client due to security policy");
141
-
varresponse=Utilities.GenerateResponse(403u,"Client Forbidden","<h1>Client Forbidden</h1><p>Access denied, your client details have been logged</p>","text/html");
0 commit comments