Пример #1
0
 public UsersController(IUserService userService, IMapper mapper, ISiteSecurityConfig siteSecurityConfig, ILogger <UsersController> logger)
 {
     this.logger             = logger;
     this.userService        = userService;
     this.mapper             = mapper;
     this.siteSecurityConfig = siteSecurityConfig;
 }
Пример #2
0
        public DasBlogSettings(IHostingEnvironment env, IOptions <SiteConfig> siteConfig, IOptions <MetaTags> metaTagsConfig, ISiteSecurityConfig siteSecurityConfig, IFileProvider fileProvider)
        {
            this.fileProvider = fileProvider;

            WebRootDirectory      = Startup.GetDataRoot(env);
            SiteConfiguration     = siteConfig.Value;
            SecurityConfiguration = siteSecurityConfig;
            MetaTags = metaTagsConfig.Value;

            RssUrl          = RelativeToRoot("feed/rss");
            PingBackUrl     = RelativeToRoot("feed/pingback");
            CategoryUrl     = RelativeToRoot("category");
            ArchiveUrl      = RelativeToRoot("archive");
            MicroSummaryUrl = RelativeToRoot("microsummary");
            RsdUrl          = RelativeToRoot("rsd");
            ShortCutIconUrl = RelativeToRoot("icon.jpg");
        }
Пример #3
0
        public DasBlogSettings(IWebHostEnvironment env, IOptions <SiteConfig> siteConfig, IOptions <MetaTags> metaTagsConfig, ISiteSecurityConfig siteSecurityConfig, IFileProvider fileProvider)
        {
            this.fileProvider = fileProvider;

            WebRootDirectory      = Startup.GetDataRoot(env);
            SiteConfiguration     = siteConfig.Value;
            SecurityConfiguration = siteSecurityConfig;
            MetaTags = metaTagsConfig.Value;

            RssUrl          = RelativeToRoot("feed/rss");
            PingBackUrl     = RelativeToRoot("feed/pingback");
            CategoryUrl     = RelativeToRoot("category");
            ArchiveUrl      = RelativeToRoot("archive");
            MicroSummaryUrl = RelativeToRoot("site/microsummary");
            RsdUrl          = RelativeToRoot("feed/rsd");
            ShortCutIconUrl = RelativeToRoot("icon.jpg");
            ThemeCssUrl     = RelativeToRoot(string.Format("theme/{0}/custom.css", SiteConfiguration.Theme));

            siteSecurityConfigPath = $"Config/siteSecurity.{env.EnvironmentName}.config";
        }
Пример #4
0
        public DasBlogSettings(IWebHostEnvironment env, IOptionsMonitor <SiteConfig> siteConfig, IOptionsMonitor <MetaTags> metaTagsConfig,
                               ISiteSecurityConfig siteSecurityConfig, IOptions <ConfigFilePathsDataOption> optionsAccessor)
        {
            WebRootDirectory  = env.ContentRootPath;
            SiteConfiguration = siteConfig.CurrentValue;

            SecurityConfiguration = siteSecurityConfig;
            MetaTags            = metaTagsConfig.CurrentValue;
            filePathDataOptions = optionsAccessor.Value;

            RssUrl          = RelativeToRoot("feed/rss");
            PingBackUrl     = RelativeToRoot("feed/pingback");
            CategoryUrl     = RelativeToRoot("category");
            ArchiveUrl      = RelativeToRoot("archive");
            MicroSummaryUrl = RelativeToRoot("site/microsummary");
            RsdUrl          = RelativeToRoot("feed/rsd");
            ShortCutIconUrl = RelativeToRoot(string.Format("theme/{0}/favicon.ico", SiteConfiguration.Theme));
            ThemeCssUrl     = RelativeToRoot(string.Format("theme/{0}/custom.css", SiteConfiguration.Theme));

            siteSecurityConfigFilePath = filePathDataOptions.SecurityConfigFilePath;
        }