https://developers.google.com/web/fundamentals/security/csp/
CSP 基于白名单来源,因为此方法可明确指示浏览器将特定的资源集视为可接受的资源,并拒绝其余资源。
https://developers.google.com/web/fundamentals/security/csp/
- 使用白名单告诉客户端允许加载和不允许加载的内容。
- 了解可使用哪些指令。
- 了解这些指令接受哪些关键字。
- 内联代码和 eval() 被视为是有害的。
- 向服务器举报政策违规行为,以免执行这些行为。
<meta http-equiv="Content-Security-Policy"
content="default-src https://cdn.example.net; child-src 'none'; object-src 'none'" />
https://github.com/xgqfrms-GitHub/webgeeker/blob/gh-pages/CSP/readme.md
new Function ([arg1[, arg2[, ...argN]],] functionBody)
https://davidwalsh.name/new-function
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function
https://docs.angularjs.org/api/ng/directive/ngCsp
https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Function
Function 构造函数 创建一个新的Function对象。
在 JavaScript 中, 每个函数实际上都是一个Function对象。
句法
new Function ([arg1[, arg2[, ...argN]],] functionBody)
参数
arg1, arg2, ... argN
被函数使用的参数的名称必须是合法命名的。
参数名称是一个有效的JavaScript标识符的字符串,或者一个用逗号分隔的有效字符串的列表;例如“×”,“theValue”,或“A,B”。
functionBody
一个含有包括函数定义的JavaScript语句的 字符串。
demo