Browse Source

Remove NWebsec from the Mvc.Server sample

pull/322/head
Kévin Chalet 9 years ago
parent
commit
543f06c062
  1. 15
      samples/Mvc.Server/Startup.cs
  2. 1
      samples/Mvc.Server/project.json

15
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 {

1
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" }

Loading…
Cancel
Save