コード例 #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);
        }
コード例 #2
0
ファイル: TenantConvention.cs プロジェクト: evisional1/mixerp
        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));
        }