Skip to content

Commit

Permalink
CSP tab added
Browse files Browse the repository at this point in the history
  • Loading branch information
enchev committed Sep 11, 2024
1 parent 17d76b4 commit 0566244
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion RadzenBlazorDemos/Pages/GetStarted.razor
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,29 @@ More info is available in the <RadzenLink Text="rendering mode article" Path="ht
@Additional(CurrentVersion)
</div>
</RadzenTabsItem>
<RadzenTabsItem Text="Content Security Policy (CSP)">
<div class="rz-p-0 rz-p-sm-2 rz-px-lg-12">
<RadzenText>
To use Radzen Blazor components with strict CSP mode, the following directives must be included in the CSP meta tag in the <code>&lt;head&gt;</code> element:
<pre class="rz-p-4">
<code>&lt;meta http-equiv="Content-Security-Policy"
content="base-uri 'self';
default-src 'self';
img-src data: https:;
object-src 'none';
script-src 'self' 'unsafe-eval' 'wasm-unsafe-eval' 'unsafe-inline';
style-src 'self' 'unsafe-inline';
upgrade-insecure-requests;"&gt
</code>
</pre>
</RadzenText>
</div>
</RadzenTabsItem>
</Tabs>
</RadzenTabs>

@code {
private static readonly string[] versions = ["net8", "net7-server", "net7-wasm", "net6-server", "net6-wasm", "wasm"];
private static readonly string[] versions = ["net8", "net7-server", "net7-wasm", "net6-server", "net6-wasm", "wasm", "csp"];

private int selectedIndex = 0;

Expand Down

0 comments on commit 0566244

Please sign in to comment.