diff --git a/src/Jhoose.Security/Repository/StandardCspPolicyRepository.cs b/src/Jhoose.Security/Repository/StandardCspPolicyRepository.cs index eed9ca2..42b9983 100644 --- a/src/Jhoose.Security/Repository/StandardCspPolicyRepository.cs +++ b/src/Jhoose.Security/Repository/StandardCspPolicyRepository.cs @@ -105,7 +105,8 @@ public override bool SaveSettings(CspSettings settings) { this.cache.Remove(Constants.SettingsCacheKey); this.cache.Remove(Constants.PolicyCacheKey); - + this.cache.Remove(Constants.ResponseHeadersCacheKey); + try { var id = ss.Save(settings, Identity.NewIdentity(settings.Id)); diff --git a/src/Jhoose.Security/Repository/StandardResponseHeadersRepository.cs b/src/Jhoose.Security/Repository/StandardResponseHeadersRepository.cs index b3a6d21..011b67f 100644 --- a/src/Jhoose.Security/Repository/StandardResponseHeadersRepository.cs +++ b/src/Jhoose.Security/Repository/StandardResponseHeadersRepository.cs @@ -73,7 +73,7 @@ public T Update(T policy) where T : ResponseHeader using (var s = GetStore()) { // This needs to go back in as it causes the app to crash. - this.cache.Remove(Constants.PolicyCacheKey); + this.cache.Remove(Constants.ResponseHeadersCacheKey); var _ = s.Save(new ResponseHeaderStorageItem(policy)); diff --git a/src/Sample/DemoSite/DemoSite.csproj b/src/Sample/DemoSite/DemoSite.csproj index 267965d..c1de3f7 100644 --- a/src/Sample/DemoSite/DemoSite.csproj +++ b/src/Sample/DemoSite/DemoSite.csproj @@ -42,9 +42,7 @@ - + diff --git a/src/Sample/DemoSite/Startup.cs b/src/Sample/DemoSite/Startup.cs index 832b99f..cfa4195 100644 --- a/src/Sample/DemoSite/Startup.cs +++ b/src/Sample/DemoSite/Startup.cs @@ -45,15 +45,15 @@ public void ConfigureServices(IServiceCollection services) }); - //services.Configure(p => p.RootPath = "~/ui"); - //services.Configure(o => o.EditUrl = new System.Uri("~/ui/CMS/", System.UriKind.Relative)); + services.Configure(p => p.RootPath = "~/ui"); + services.Configure(o => o.EditUrl = new System.Uri("~/ui/CMS/", System.UriKind.Relative)); services.TryAddEnumerable(ServiceDescriptor.Singleton(typeof(IFirstRequestInitializer), typeof(BootstrapAdminUser))); services.AddJhooseSecurity(_configuration, (o) => { o.UseHeadersUI = true; - //o.ExclusionPaths.Add("/ui"); + o.ExclusionPaths.Add("/ui"); }, configurePolicy: (p) => {