diff --git a/docs/Releases.md b/docs/Releases.md index 067fb8f09..4c10b932a 100644 --- a/docs/Releases.md +++ b/docs/Releases.md @@ -8,6 +8,7 @@ This page tracks major changes included in any update starting with version 4.0. #### Unreleased - **New**: - Added an option to control `SpacesAfterCommas` to `InlineSqlFormatter` and `SqlServerFormatter` ([#549](https://github.com/MiniProfiler/dotnet/pull/549) - thanks [Turnerj](https://github.com/Turnerj)) + - Fixed `nonce` attribute propagation to generated `` style element for full CSP support ([#565](https://github.com/MiniProfiler/dotnet/pull/565)) #### Version 4.2.1 - **New**: diff --git a/src/MiniProfiler.Shared/ui/lib/MiniProfiler.ts b/src/MiniProfiler.Shared/ui/lib/MiniProfiler.ts index 4573c3bc9..6b6121025 100644 --- a/src/MiniProfiler.Shared/ui/lib/MiniProfiler.ts +++ b/src/MiniProfiler.Shared/ui/lib/MiniProfiler.ts @@ -111,6 +111,7 @@ namespace StackExchange.Profiling { ids: string[]; ignoredDuplicateExecuteTypes: string[]; maxTracesToShow: number; + nonce: string; path: string; renderPosition: RenderPosition; showChildrenTime: boolean; @@ -298,6 +299,7 @@ namespace StackExchange.Profiling { toggleShortcut: data.toggleShortcut, startHidden: bool(data.startHidden), ignoredDuplicateExecuteTypes: (data.ignoredDuplicateExecuteTypes || '').split(','), + nonce: script.nonce, }; function doInit() { @@ -372,7 +374,7 @@ namespace StackExchange.Profiling { } else { alreadyDone = true; if (mp.options.authorized) { - document.head.insertAdjacentHTML('beforeend', ``); + document.head.insertAdjacentHTML('beforeend', ``); } doInit(); }