Skip to content

Content Security Policy Issue with FluentUI #23977

Discussion options

You must be logged in to vote

I spent quite few hours in this hurdle...

But now in package.json :

  "plugins": [
        [
          "@electron-forge/plugin-webpack",
          {
            "mainConfig": "./webpack.main.config.js",
            "devContentSecurityPolicy": "default-src 'none'; script-src 'unsafe-eval'; script-src-elem 'self'; img-src *; style-src 'self' 'unsafe-inline'; font-src 'self' https://static2.sharepointonline.com/files/fabric/assets/icons/; connect-src 'self';",

./src/app/index.html :

<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8">
  </head>
  <body>
    <div id="app" style="height: 100%;" style-src="../../assets/fonts/" 'self' data:></div>
  </body>
</html>

and commented __webpac…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by micahgodbolt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant