Skip to content

Commit

Permalink
Update _Host.cshtml
Browse files Browse the repository at this point in the history
  • Loading branch information
damienbod authored Oct 14, 2023
1 parent e06ca48 commit 95079e4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions server/Pages/_Host.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
// The nonce is passed to the client through the HTML to avoid sync issues between tabs
source = source.Replace("**PLACEHOLDER_NONCE_SERVER**", nonce);

var nonceScript = $"<script nonce=\"{nonce}\" type=";
source = source.Replace("<script type=", nonceScript);
var nonceScript = $"<script nonce=\"{nonce}\" ";
source = source.Replace("<script ", nonceScript);

// link rel="stylesheet"
var nonceLinkStyle = $"<link nonce=\"{nonce}\" rel=\"stylesheet";
Expand All @@ -40,4 +40,4 @@
Response.Cookies.Append("XSRF-RequestToken", requestToken ?? "", new CookieOptions() { HttpOnly = false, IsEssential = true, Secure = true, SameSite = SameSiteMode.Strict });
}

@Html.Raw(source)
@Html.Raw(source)

0 comments on commit 95079e4

Please sign in to comment.