adding support for IP EndPoint whitelisting in HttpServer code.

This commit is contained in:
Dr Scofield
2008-07-07 11:25:09 +00:00
parent c5333af7a2
commit aaf8fff57e
2 changed files with 24 additions and 10 deletions

View File

@@ -165,11 +165,14 @@ namespace OpenSim.Framework.Servers
if (null != endPointsRegex)
{
// TODO: following code requires code changes to
// HttpServer.HttpRequest
// HttpServer.HttpRequest to become functional
// IPEndPoint remote = HttpServer.HttpRequest.RemoteIPEndPoint;
// Match epm = endPointsRegex.Match(remote.ToString());
// if (!epm.Success) continue;
IPEndPoint remote = req.RemoteIPEndPoint;
if (null != remote)
{
Match epm = endPointsRegex.Match(remote.ToString());
if (!epm.Success) continue;
}
}
// whitelist ok, now check path