Beispiel #1
0
        public RequestAttributes GetRequestAttributes(System.ServiceModel.OperationContext operationContext)
        {
            if (!HostContext.Config.EnableAccessRestrictions)
            {
                return(default(RequestAttributes));
            }

            var portRestrictions = default(RequestAttributes);
            var ipAddress        = GetIpAddress(operationContext);

            portRestrictions |= HttpRequestExtensions.GetAttributes(ipAddress);

            //TODO: work out if the request was over a secure channel
            //portRestrictions |= request.IsSecureConnection ? PortRestriction.Secure : PortRestriction.InSecure;

            return(portRestrictions);
        }