NWebsec / Docs

NWebsec docs
https://www.nwebsec.com
8 stars 5 forks source link

Update Configuring-csp.rst #3

Closed snomad closed 6 years ago

snomad commented 6 years ago

Added example of passing a list of values in the fluent API.

klings commented 6 years ago

If you take a closer look it takes a params, which means you can supply several values directly, no need to initialize an array, e.g.:

app.UseCsp(options => options
    .DefaultSources(s => s.Self())
    .ScriptSources(s => s.Self().CustomSources("scripts.nwebsec.com"))
    .ConnectSources(s => s.CustomSources("https://contoso.com", "wss:"))