check XFF headers of caller, but be quiet about them
parent
4da5d249d8
commit
24885819fc
|
@ -225,8 +225,8 @@ namespace OpenSim.Server.Handlers.MapImage
|
|||
|
||||
private System.Net.IPAddress GetCallerIP(IOSHttpRequest request)
|
||||
{
|
||||
if (!m_Proxy)
|
||||
return request.RemoteIPEndPoint.Address;
|
||||
// if (!m_Proxy)
|
||||
// return request.RemoteIPEndPoint.Address;
|
||||
|
||||
// We're behind a proxy
|
||||
string xff = "X-Forwarded-For";
|
||||
|
@ -236,7 +236,7 @@ namespace OpenSim.Server.Handlers.MapImage
|
|||
|
||||
if (xffValue == null || (xffValue != null && xffValue == string.Empty))
|
||||
{
|
||||
m_log.WarnFormat("[MAP IMAGE HANDLER]: No XFF header");
|
||||
// m_log.WarnFormat("[MAP IMAGE HANDLER]: No XFF header");
|
||||
return request.RemoteIPEndPoint.Address;
|
||||
}
|
||||
|
||||
|
|
|
@ -229,8 +229,8 @@ namespace OpenSim.Server.Handlers.MapImage
|
|||
|
||||
private System.Net.IPAddress GetCallerIP(IOSHttpRequest request)
|
||||
{
|
||||
if (!m_Proxy)
|
||||
return request.RemoteIPEndPoint.Address;
|
||||
// if (!m_Proxy)
|
||||
// return request.RemoteIPEndPoint.Address;
|
||||
|
||||
// We're behind a proxy
|
||||
string xff = "X-Forwarded-For";
|
||||
|
@ -240,7 +240,7 @@ namespace OpenSim.Server.Handlers.MapImage
|
|||
|
||||
if (xffValue == null || (xffValue != null && xffValue == string.Empty))
|
||||
{
|
||||
m_log.WarnFormat("[MAP IMAGE HANDLER]: No XFF header");
|
||||
// m_log.WarnFormat("[MAP IMAGE HANDLER]: No XFF header");
|
||||
return request.RemoteIPEndPoint.Address;
|
||||
}
|
||||
|
||||
|
|
|
@ -531,11 +531,11 @@ namespace OpenSim.Server.Handlers.Simulation
|
|||
|
||||
if (!headers.ContainsKey(xff) || headers[xff] == null)
|
||||
{
|
||||
m_log.WarnFormat("[AGENT HANDLER]: No XFF header");
|
||||
// m_log.WarnFormat("[AGENT HANDLER]: No XFF header");
|
||||
return Util.GetCallerIP(request);
|
||||
}
|
||||
|
||||
m_log.DebugFormat("[AGENT HANDLER]: XFF is {0}", headers[xff]);
|
||||
// m_log.DebugFormat("[AGENT HANDLER]: XFF is {0}", headers[xff]);
|
||||
|
||||
IPEndPoint ep = Util.GetClientIPFromXFF((string)headers[xff]);
|
||||
if (ep != null)
|
||||
|
|
Loading…
Reference in New Issue