Esempio n. 1
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="request">The incoming request</param>
        public Requestor(Request request)
        {
            string requestIpAddress = ClientDetails.Module.IpAddress(request.Raw.ServerVariables);

            _parameters = request.ParameterSet;

            if (_parameters.ContainsKey(Settings.GetString("ParameterKeyRequestorImpersonateIp")) && ClientDetails.Module.IsDatacenter(requestIpAddress) && IsValidIpAddress(_parameters[Settings.GetString("ParameterKeyRequestorImpersonateIp")]))
            {
                _hostipaddress = _parameters[Settings.GetString("ParameterKeyRequestorImpersonateIp")];
            }
            else
            {
                _hostipaddress = requestIpAddress;
            }
        }