Архивы Node.js - Заметки Эникейщика https://7d3.ru/wiki/category/web/node-js Или Рутинная Работа Системного Администратора Wed, 25 Jul 2018 11:39:25 +0000 ru-RU hourly 1 https://wordpress.org/?v=7.1.4 [Electron] Insecure Content-Security-Policy https://7d3.ru/wiki/897 https://7d3.ru/wiki/897#respond Mon, 23 Jul 2018 11:50:03 +0000 https://7d3.ru/?p=897 Electron Security Warning (Insecure Content-Security-Policy) This renderer process has either no Content Security Policy set or a policy with «unsafe-eval» enabled. This exposes users of this app to unnecessary security risks. For more information and help, consult https://electronjs.org/docs/tutorial/security. This warning will not show up once the app is packaged.   Решение: Добавить в хедеры [crayon-6aeb7be74dcf3733176441/] […]

Сообщение [Electron] Insecure Content-Security-Policy появились сначала на Заметки Эникейщика.

]]>
Electron Security Warning (Insecure Content-Security-Policy) This renderer process has either no Content Security Policy set or a policy with «unsafe-eval» enabled. This exposes users of this app to unnecessary security risks.

For more information and help, consult https://electronjs.org/docs/tutorial/security.
This warning will not show up once the app is packaged.

 

Решение: Добавить в хедеры

<meta http-equiv="Content-Security-Policy" content="script-src 'self'">

 

Если присутствую инлайн скрипты и ругается на
Refused to execute inline script because it violates the following Content Security Policy directive: «script-src ‘self'». Either the ‘unsafe-inline’ keyword, a hash (‘sha256-w7PFxwNT5YRCq/TbK4hTeghGFRq6Vi33EchhMUrcs8o=’), or a nonce (‘nonce-…’) is required to enable inline execution.

Копируем хеш из ошибки и добавляем в исключения

<meta http-equiv="Content-Security-Policy" content="script-src 'self' 'sha256-w7PFxwNT5YRCq/TbK4hTeghGFRq6Vi33EchhMUrcs8o=' ">

или добавить

'unsafe-inline'

Сообщение [Electron] Insecure Content-Security-Policy появились сначала на Заметки Эникейщика.

]]>
https://7d3.ru/wiki/897/feed 0
[NODE.js] npm proxy and strict-ssl setting https://7d3.ru/wiki/895 https://7d3.ru/wiki/895#respond Mon, 23 Jul 2018 06:40:20 +0000 https://7d3.ru/?p=895 homedir/.npmrc [crayon-6aeb7be74e251473369185/]

Сообщение [NODE.js] npm proxy and strict-ssl setting появились сначала на Заметки Эникейщика.

]]>
homedir/.npmrc

proxy http://{login}{password}@{proxy_server}:{proxy_port}
https-proxy http://{login}{password}@{proxy_server}:{proxy_port}
http-proxy http://{login}{password}@{proxy_server}:{proxy_port}
strict-ssl=false
registry=http://registry.npmjs.org/
ca=

Сообщение [NODE.js] npm proxy and strict-ssl setting появились сначала на Заметки Эникейщика.

]]>
https://7d3.ru/wiki/895/feed 0