mirror of
https://github.com/electron/electron.git
synced 2026-01-10 07:58:08 -05:00
Add unsafe-inline (#20414)
Versions didn't show and I was getting errors in the Developer Tools: `Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'self'"`. The cause is probably that Chrome has implemented extra security since this tutorial was created. Added 'unsafe-inline' and it works.
This commit is contained in:
committed by
Shelley Vohr
parent
0a09f27735
commit
39d19d23d1
@@ -196,7 +196,7 @@ Finally the `index.html` is the web page you want to show:
|
||||
<meta charset="UTF-8">
|
||||
<title>Hello World!</title>
|
||||
<!-- https://electronjs.org/docs/tutorial/security#csp-meta-tag -->
|
||||
<meta http-equiv="Content-Security-Policy" content="script-src 'self';" />
|
||||
<meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline';" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>Hello World!</h1>
|
||||
|
||||
Reference in New Issue
Block a user