Skip to content

Commit

Permalink
Updated csp for swagger
Browse files Browse the repository at this point in the history
  • Loading branch information
vivet committed Aug 31, 2024
1 parent b8e293a commit 6de43c7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Nano.Web/Extensions/ApplicationBuilderExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ internal static IApplicationBuilder UseHttpDocumentataion(this IApplicationBuild
var originalIndexHtmlContents = originalStreamReader
.ReadToEnd();

var pattern = "<(script|style)([^>]*)>";
var pattern = "<(script|style|link)([^>]*)>";
var replacement = $"<$1$2 nonce=\"{webOptions.Documentation.CspNonce}\">";
var nonceEnabledIndexHtmlContents = Regex.Replace(originalIndexHtmlContents, pattern, replacement, RegexOptions.IgnoreCase);

Expand Down
2 changes: 1 addition & 1 deletion NanoCore.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
<metadata>
<id>NanoCore</id>
<version>8.1.23</version>
<version>8.1.24</version>
<title>Nano Core</title>
<summary>Rapidly built and deploy rich .NET 8.0 applications. Configuration, Security, Logging, Data, Hosting, Docs, Localization, Versioning, Api, Error-Handling, and much more.</summary>
<description>The project is inspired by years of tedious repetitions, continuously re-writing similar code-snippets and libraries, to handle common functionality, not related to the business domain, such as logging, data persistence, message queuing, documentation, validation and similar.</description>
Expand Down

0 comments on commit 6de43c7

Please sign in to comment.