You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I see some things right off the bat that we'll need to take a look at, but I'll postpone further analysis and work until after the 🦃 Day holiday weekend.
Using the article's existing CSPs in Development, the apps 💥 ...
Blazor WebAssembly App console:
Content-Security-Policy: The page’s settings blocked the loading of a resource at inline (“script-src”). content-scripts.js:1:68303
Content-Security-Policy: The page’s settings blocked the loading of a resource at wss://localhost:44395/BlazorWASM80TestLocalization/ (“default-src”). aspnetcore-browser-refresh.js:268:24
Content-Security-Policy: The page’s settings blocked the loading of a resource at ws://localhost:50713/BlazorWASM80TestLocalization/ (“default-src”).
Blazor Web App console:
Content-Security-Policy: The page’s settings blocked the loading of a resource at inline (“script-src”).
Content-Security-Policy: The page’s settings blocked the loading of a resource at inline (“script-src”). content-scripts.js:1:68303
Content-Security-Policy: The page’s settings blocked the loading of a resource at inline (“script-src”). localhost:7119:55:12
Content-Security-Policy: The page’s settings blocked the loading of a resource at wss://localhost:44342/BlazorWebApp80EnvironmentTesting/ (“default-src”). aspnetcore-browser-refresh.js:268:24
Content-Security-Policy: The page’s settings blocked the loading of a resource at ws://localhost:50766/BlazorWebApp80EnvironmentTesting/ (“default-src”). aspnetcore-browser-refresh.js:268:24
I think we should throw a 🐶 a 🦴 and explain how devs can avoid CSP errors during development.
One simple approach is with Razor in the App component of a BWA (that would apply to all layouts) is ...
Description
I see some things right off the bat that we'll need to take a look at, but I'll postpone further analysis and work until after the 🦃 Day holiday weekend.
Using the article's existing CSPs in Development, the apps 💥 ...
Blazor WebAssembly App console:
Blazor Web App console:
I think we should throw a 🐶 a 🦴 and explain how devs can avoid CSP errors during development.
One simple approach is with Razor in the
App
component of a BWA (that would apply to all layouts) is ...Also, the layout approach works, but it would need to be in all of the app's layouts ...
For Blazor WebAssembly apps, it can be done in the app's layouts or the
App
component with ...Page URL
https://learn.microsoft.com/en-us/aspnet/core/blazor/security/content-security-policy?view=aspnetcore-8.0
Content source URL
https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/blazor/security/content-security-policy.md
Document ID
6e0b5c52-90a1-5ca6-bfad-df33a8beae6c
Article author
guardrex
The text was updated successfully, but these errors were encountered: