Try to change the security policy, for example:
<meta http-equiv="Content-Security-Policy" content="default-src *; style-src 'self' https://localhost:5001 'unsafe-inline'; script-src 'self' http://* 'unsafe-inline' 'unsafe-eval'" />
Or only
<meta http-equiv="Content-Security-Policy" content="script-src 'self' https://localhost:5001 'unsafe-inline' 'unsafe-eval'" />
Chrome has the CSP (Content Security Policy).
- You can't use inline scripting in your Chrome App pages. The restriction bans both blocks and event handlers ().
- You can't reference any external resources in any of your app files (except for video and audio resources). You can't embed external resources in an iframe.
- You can't use string-to-JavaScript methods like eval() and new Function().
Here is the policy value:
default-src 'self';
connect-src * data: blob: filesystem:;
style-src 'self' data: 'unsafe-inline';
img-src 'self' data:;
frame-src 'self' data:;
font-src 'self' data:;
media-src * data: blob: filesystem:;
More infomation
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…