Browse Source

Update the NWebSec options to support local scripts

pull/31/head
Kévin Chalet 10 years ago
parent
commit
225a5c3cf3
  1. 2
      src/OpenIddict.Mvc/OpenIddictExtensions.cs

2
src/OpenIddict.Mvc/OpenIddictExtensions.cs

@ -30,7 +30,7 @@ namespace Microsoft.AspNet.Builder {
// See https://nwebsec.codeplex.com/wikipage?title=Configuring%20Content%20Security%20Policy&referringTitle=NWebsec // See https://nwebsec.codeplex.com/wikipage?title=Configuring%20Content%20Security%20Policy&referringTitle=NWebsec
owin.UseCsp(options => options.DefaultSources(directive => directive.Self()) owin.UseCsp(options => options.DefaultSources(directive => directive.Self())
.ImageSources(directive => directive.Self().CustomSources("*")) .ImageSources(directive => directive.Self().CustomSources("*"))
.ScriptSources(directive => directive.UnsafeInline()) .ScriptSources(directive => directive.Self().UnsafeInline())
.StyleSources(directive => directive.Self().UnsafeInline())); .StyleSources(directive => directive.Self().UnsafeInline()));
// Insert a new middleware responsible of setting the X-Content-Type-Options header. // Insert a new middleware responsible of setting the X-Content-Type-Options header.

Loading…
Cancel
Save