EnforceSsl() public method

public EnforceSsl ( string domain ) : bool
domain string
return bool
Exemplo n.º 1
0
        public void CheckIfSslIsEnforcedTest(string domain, bool shouldBeEnforced)
        {
            var logger = new FakeLogger();
            var serializer = new FakeDomainSerializer();

            var check = new SslDomainCheck(logger, serializer);
            bool result = check.EnforceSsl(domain);

            Assert.Equal(shouldBeEnforced, result);
        }
Exemplo n.º 2
0
        public static bool EnforceSsl(string domain = "")
        {
            if(string.IsNullOrWhiteSpace(domain))
            {
                domain = GetDomain();
            }

            var logger = Log.Logger;
            var serializer = GetSerializer();
            var check = new SslDomainCheck(logger, serializer);
            return check.EnforceSsl(domain);
        }