본문 바로가기
Electron

[오류]일렉트론 콘솔에 오류, 경고 없애기

by 으노으뇨 2023. 3. 1.
728x90
반응형
SMALL

일렉트론으로 개발하다보면 위와같이 보기싫은 에러코드라던가 경고메세지가 나옵니다.

이것을 없애는 방법에 대해서 설명드리겠습니다.

node:electron/js2c/renderer_init:2 Electron Security Warning (Insecure Resources) This renderer process loads resources using insecure protocols. This exposes users of this app to unnecessary security risks. Consider loading the following resources over HTTPS or FTPS. - http://themes.googleusercontent.com/static/fonts/titilliumweb/v2/anMUvcNT0H1YN4FII8wpr24bNCNEoFTpS2BTjF6FB5E.woff 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';">

이것을 추가하면 없애실 수 있으십니다.

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="upgrade-insecure-requests">

를 추가하면 없어질겁니다.

추가한모습

아까 노랭색의  오류들이 모두 사라진 모습입니다.

이것으로 일렉트론 초기 에러가 발생하는 것을 없애보았습니다. 감사합니다.

 

728x90
반응형
LIST

댓글