From 543f06c062f6f8c68cada7dda154ac5ebec88598 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Chalet?= Date: Fri, 30 Dec 2016 17:32:56 +0100 Subject: [PATCH] Remove NWebsec from the Mvc.Server sample --- samples/Mvc.Server/Startup.cs | 15 --------------- samples/Mvc.Server/project.json | 1 - 2 files changed, 16 deletions(-) diff --git a/samples/Mvc.Server/Startup.cs b/samples/Mvc.Server/Startup.cs index d4b79807..24a2f719 100644 --- a/samples/Mvc.Server/Startup.cs +++ b/samples/Mvc.Server/Startup.cs @@ -8,7 +8,6 @@ using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Mvc.Server.Models; using Mvc.Server.Services; -using NWebsec.AspNetCore.Middleware; using OpenIddict.Core; using OpenIddict.Models; @@ -119,20 +118,6 @@ namespace Mvc.Server { // options.ClientSecret = "875sqd4s5d748z78z7ds1ff8zz8814ff88ed8ea4z4zzd"; // }); - app.UseCsp(options => options.DefaultSources(directive => directive.Self()) - .ImageSources(directive => directive.Self() - .CustomSources("*")) - .ScriptSources(directive => directive.Self() - .UnsafeInline()) - .StyleSources(directive => directive.Self() - .UnsafeInline())); - - app.UseXContentTypeOptions(); - - app.UseXfo(options => options.Deny()); - - app.UseXXssProtection(options => options.EnabledWithBlockMode()); - app.UseIdentity(); app.UseGoogleAuthentication(new GoogleOptions { diff --git a/samples/Mvc.Server/project.json b/samples/Mvc.Server/project.json index 2c31cfc1..b7a1e097 100644 --- a/samples/Mvc.Server/project.json +++ b/samples/Mvc.Server/project.json @@ -35,7 +35,6 @@ "Microsoft.Extensions.Configuration.Json": "1.0.0", "Microsoft.Extensions.Logging.Console": "1.0.0", "Microsoft.Extensions.Logging.Debug": "1.0.0", - "NWebsec.AspNetCore.Middleware": "1.0.0-gamma1-15", "OpenIddict": { "target": "project" }, "OpenIddict.EntityFrameworkCore": { "target": "project" }, "OpenIddict.Mvc": { "target": "project" }